On Fri, Jul 19, 2024 at 8:01 PM Michal Hocko <mhocko@xxxxxxxx> wrote: > > On Fri 19-07-24 19:51:06, Barry Song wrote: > > On Fri, Jul 19, 2024 at 7:42 PM Michal Hocko <mhocko@xxxxxxxx> wrote: > [...] > > > It cannot reclaim itself and it cannot sleep to wait for the memory so > > > NOFAIL semantic is simply impossible. We have put a warning in place to > > > > this is still "right" behaviour to retry infinitely at least according > > to the doc of > > __GFP_NOFAIL. > > I do not agree that implementing busy loop in the kernel is the right > practice! > > > I assume getting new memory by many retries is still > > possibly some other processes might be reclaiming or freeing memory > > then providing free memory to this one being stuck. > > No, I strongly disagree we should even pretend this is a supported > allocation strategy. NAK to any attempt to legalize it in some form. fare enough. I am not trying to legitimize it, just explaining what the documentation says. If it is illegal, we should clearly and firmly state that it is illegal, rather than pretending it is legal and returning NULL. This is also wrong. > > -- > Michal Hocko > SUSE Labs