On Thu, Oct 03, 2024 at 10:07:33AM GMT, Michal Hocko wrote: > On Wed 02-10-24 00:41:29, Christoph Hellwig wrote: > [...] > > What I'd propose is something like the patch below, plus proper > > documentation. Note that this now does the uncharge on the unlocked > > folio in the error case. From a quick look that should be fine, but > > someone who actually knows the code needs to confirm that. > > yes, this is a much cleaner solution. filemap_add_folio_nocharge would > need documentation explaining when this is supposed to be used. > I feel like we should not make bypassing cgroup accounting easier but rather make it more awkward :P, so folks give much more thought before opting to do so. Though I agree filemap_add_folio_nocharge() is easy to grep.