Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp524789ybz; Wed, 29 Apr 2020 04:45:30 -0700 (PDT) X-Google-Smtp-Source: APiQypJyDZga38jyOIs6frnzelHJ3svEkbVCzfEduz84kVjwgPxwKtiBAwgkIArqinBaWQlnS7zc X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr1904959edu.223.1588160730476; Wed, 29 Apr 2020 04:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588160730; cv=none; d=google.com; s=arc-20160816; b=NBsguAvs53YLP7LWBMMRUq5bMS8/Nl6u3weTIzg1rSnwcewoOiLIY7KQGH5NuQGVbu rHTi124hEvPp/QCba7DlMzA7fjZ7sOD7KCcOgIY9Y1CuisuxrUDrxqftr4TrZOa9lYW5 Ag4L8JuSK4ftO1LNT+z/GoXPaH2fPHJSAyNV6695GfD5EL8NQ0woxWM0V5IFTIPf/thN D0NUHGKdC2yOXjbTq4Gm2bl78VISrPwEFm6+FM7VluAvx9gSB9SGC+ZupO0WmMcn62zN QZg9HbvUK6ilDz/Sb0fnnoQm3Iz1knKIKpCggDg1kLkuFFa8RrM5myR9NE3EDqDgqB9q n9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vevoXjwrhXkj2nIiMSFHvSIkFN/LcgtuZhtgDAeX9Ho=; b=atjJOohhkKujYbKGCcTlYrxDevP86K82Rh8HAFPpox0z5zHCgZpy7BpVvjWvMIQhAL 0s3rI6z7h0+WHXYximYBwYZS4oFiaqp9VyBI7O2lvVBLizvmlJ4WH1O4CgoIHnPdewlq 4EzNMF7Drlis6/q6GRWPW967QNket+YO0lAVaa2JWNw2Lu4V8LeI5Es8AUklCra01WuJ UznSaTqs6HaJ8dH/wAJ786/ibPtZMtDGfA9j2axsTAUCqXxlPfuSUrZ5HROXHEUcm8z/ 7EiCluQbyuftFZDtYinYWaoIxTKJkLK1kdxcB61NQxxxMR8xpK0+SlY9IVmNe6ALcNtn +juA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da15si3551198edb.140.2020.04.29.04.45.06; Wed, 29 Apr 2020 04:45:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbgD2Lne (ORCPT + 99 others); Wed, 29 Apr 2020 07:43:34 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:36459 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbgD2Lne (ORCPT ); Wed, 29 Apr 2020 07:43:34 -0400 Received: by mail-wm1-f44.google.com with SMTP id u127so1669222wmg.1 for ; Wed, 29 Apr 2020 04:43:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vevoXjwrhXkj2nIiMSFHvSIkFN/LcgtuZhtgDAeX9Ho=; b=YMefvzWk97A6u3K0L0ZVr8W7vE1ogxWJV94aa9KTKzTmYc8kGi53tZh71ZVXR/so+M OjpcXJpHk507wGrlLpBodmKK6gGbb3lpjjmOu1GbRvURBGhfEf51HLUlaehb/HEqskD9 LU+4dvg4OXFGx+JnElb/a3nb4n7rpLCyFM0T5zB+XoNjNaRQoIamiRhUX8H7kBpkM+I2 EjCC4rnvLrY3gxYcCPZ/Vgs6j3urVL2gLUb7Zi/Y3Cr2fAL91a4/fMBlqRuAGE9DmxpS LX+hKkAgl4NEn+gHbdJ2xISIZKam0hUmIGgcfCXa0i9j9/gNW3ohre59WrVGt9l+1rH5 5f5A== X-Gm-Message-State: AGi0PuZIhJ6LDpyp8lKj4y+frsMHJ/asUVrBIWRrqXh6QenqT/H5RBJk qCGqGcNeJDMHLxRVz87EyjoeVVtn X-Received: by 2002:a05:600c:2945:: with SMTP id n5mr2815015wmd.148.1588160612267; Wed, 29 Apr 2020 04:43:32 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id z10sm30564879wrg.69.2020.04.29.04.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 04:43:31 -0700 (PDT) Date: Wed, 29 Apr 2020 13:43:29 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Vlastimil Babka , David Rientjes , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman Subject: Re: [patch] mm, oom: stop reclaiming if GFP_ATOMIC will start failing soon Message-ID: <20200429114329.GB28637@dhcp22.suse.cz> References: <20200425172706.26b5011293e8dc77b1dccaf3@linux-foundation.org> <20200427133051.b71f961c1bc53a8e72c4f003@linux-foundation.org> <28e35a8b-400e-9320-5a97-accfccf4b9a8@suse.cz> <31f1f84d-c5fe-824b-3c28-1a9ad69fcae5@suse.cz> <20200429090437.GX28637@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 29-04-20 19:45:07, Tetsuo Handa wrote: > On 2020/04/29 18:04, Michal Hocko wrote: > > Completely agreed! The in kernel OOM killer is to deal with situations > > when memory is desperately depleted without any sign of a forward > > progress. If there is a reclaimable memory then we are not there yet. > > If a workload can benefit from early oom killing based on response time > > then we have facilities to achieve that (e.g. PSI). > > Can PSI work even if userspace process cannot avoid reclaimable memory > allocations (e.g. page fault, file read) is already stalling? The userspace itself would have to be careful and use mlock of course. But collecting the psi information itself should be pretty independent on memory allocations as monitoring the system memory state is one of the main usecases. > I'm not sure > whether PSI allows responding quickly enough to "keep reclaimable memory > allocations not to reclaim" despite there is still reclaimable memory... PSI is supposed to monitor time spent in the memory allocator (among other things) and report the tendency. This should be a sufficient metric to judge that a large part of the userspace is not making forward progress. -- Michal Hocko SUSE Labs