From: Roman Gushchin Subject: Re: [RFC] memory reserve for userspace oom-killer Date: Wed, 21 Apr 2021 12:04:05 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=facebook; bh=pmCvH+b8TCN+8GDVAOpl+l0ohuWQx7qmmsTRAgatbgI=; b=TB2FjrRSEly2Cw08PBeYWPjQS9JaaW/mgnByv2FONQNU7CyEWTDtDVA+l1PaPq8dq80+ ess1pQiBkvzOxSNsg+HZgXpeiq9CCIal5/47VCSKPSGV92sxTizkB75V+hC5Cg9/TcNv GC+CKD60VD3GdufYf1CX0kKTLWDoQOuv1lQ= Content-Disposition: inline In-Reply-To: List-ID: Content-Transfer-Encoding: 7bit To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Linux MM , Andrew Morton , Cgroups , David Rientjes , LKML , Suren Baghdasaryan , Greg Thelen , Dragos Sbirlea , Priya Duraisamy On Wed, Apr 21, 2021 at 06:26:37AM -0700, Shakeel Butt wrote: > On Tue, Apr 20, 2021 at 7:58 PM Roman Gushchin wrote: > > > [...] > > > > > > Michal has suggested ALLOC_OOM which is less risky. > > > > The problem is that even if you'll serve the oom daemon task with pages > > from a reserve/custom pool, it doesn't guarantee anything, because the task > > still can wait for a long time on some mutex, taken by another process, > > throttled somewhere in the reclaim. > > I am assuming here by mutex you are referring to locks which > oom-killer might have to take to read metrics or any possible lock > which oom-killer might have to take which some other process can take > too. > > Have you observed this situation happening with oomd on production? I'm not aware of any oomd-specific issues. I'm not sure if they don't exist at all, but so far it's wasn't a problem for us. Maybe it because you tend to have less pagecache (as I understand), maybe it comes to specific oomd policies/settings. I know we had different pains with mmap_sem and atop and similar programs, where reading process data stalled on mmap_sem for a long time. Thanks!