  We give details of our precise determination of the light quark masses
m_{ud}=(m_u+m_d)/2 and m_s in 2+1 flavor QCD, with simulated pion masses down
to 120 MeV, at five lattice spacings, and in large volumes. The details concern
the action and algorithm employed, the HMC force with HEX smeared clover
fermions, the choice of the scale setting procedure and of the input masses.
After an overview of the simulation parameters, extensive checks of algorithmic
stability, autocorrelation and (practical) ergodicity are reported. To
corroborate the good scaling properties of our action, explicit tests of the
scaling of hadron masses in N_f=3 QCD are carried out. Details of how we
control finite volume effects through dedicated finite volume scaling runs are
reported. To check consistency with SU(2) Chiral Perturbation Theory the
behavior of M_\pi^2/m_{ud} and F_\pi as a function of m_{ud} is investigated.
Details of how we use the RI/MOM procedure with a separate continuum limit of
the running of the scalar density R_S(\mu,\mu') are given. This procedure is
shown to reproduce the known value of r_0m_s in quenched QCD. Input from
dispersion theory is used to split our value of m_{ud} into separate values of
m_u and m_d. Finally, our procedure to quantify both systematic and statistical
uncertainties is discussed.
