Nobody answered here, so I hope, the following will not be perceived as just a self-advertisement.
I believe, the theory of stereotype spaces is the easiest way to memorize these things. If $V$ is a stereotype space, it is automatically dual to some locally convex space $U$, namely to the so-called stereotype dual space $V^\star$, so that
$$
V=U^\star,\qquad U=V^\star
$$
(here every star $\star$ means the space of linear continuous functionals with the topology of uniform convergence on totally bounded sets, and every equality = means an isomorphism of locally convex spaces). So every continuous functional on $V$ belongs to $U$, and what you need will be fulfilled: if you take a closed subspace $X$ in $V$ and endow $X$ with the topology induced from $V$ (induced in the sense of the theory of topological vector spaces), then each linear continuous functional on $X$ can be extended to a linear continuous functional on $V$, i.e. to an element of $U$.
The class $\sf Ste$ of stereotype spaces is very wide, in particularly, it contains all Banach spaces, all Fréchet spaces, all quasicomplete barreled spaces. And it is closed under natural operations like taking limits and colimits (with some nuances however, since limits and colimits in $\sf Ste$ are not quite the same as in the category of locally convex spaces). Because of this for a locally convex space $V$ the property of being stereotype is usually easily checkable, since usually spaces are constructed from comparably simple components like Banach spaces (with the help of operations like taking limits, co-limits, subspaces, or quotient spaces). Besides this there is a nice criterion of stereotypy.