We investigate the computational aspects of the prior term in the field-to-susceptibility inversion problem for QSM. Providing a spatially continuous formulation of the problem, we analyze 1) its Euler-Lagrange equation that appears degeneracy and 2) the Gauss-Newton conjugate gradient (GNCG) algorithm that employs numerical conditioning. We propose a primal-dual (PD) formulation that avoids such degeneracy and use the Chambolle-Pock algorithm to solve this alternative formulation; thus numerical conditioning is not required. The two methods were tested and validated on numerical/gadolinium phantoms and ex-vivo/in-vivo MRI data. The PD formulation with the Chambolle-Pock algorithm was faster and more accurate than GNCG.