  The entropy principle shows that, for self-gravitating perfect fluid, the
Einstein field equations can be derived from the extrema of the total entropy,
and the thermodynamical stability criterion are equivalent to the dynamical
stability criterion. In this paper, we recast the dynamical criterion for the
charged self-gravitating perfect fluid in Einstein-Maxwell theory, and further
give the criterion of the star with barotropic condition. In order to obtain
the thermodynamical stability criterion, first we get the general formula of
the second variation of the total entropy for charged perfect fluid case, and
then obtain the thermodynamical criterion for radial perturbation. We show that
these two stability criterion are the same, which suggest that the inherent
connection between gravity and thermodynamic even when the electric field is
taken into account.
