A spin valve (SV) sensor of the self-pinned type includes one or more
compressive stress modification layers for reducing the likelihood that
the pinning field will flip its direction. The spin valve sensor includes
a capping layer formed over a spin valve structure which includes a free
layer, an antiparallel (AP) self-pinned layer structure, and a spacer
layer in between the free layer and the AP self-pinned layer structure. A
compressive stress modification layer is formed above or below the
capping layer, adjacent the AP self-pinned layer structure, or both.
Preferably, the compressive stress modification layer is made of
ruthenium (Ru) or other suitable material.