Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1119581pxb; Thu, 28 Jan 2021 08:26:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRNljff27cA8EHWcvnoDLo96BOuaQ0CS4dvfhpXc0V2Bizq3aoMfbOtOXra1eHEx9JPFRe X-Received: by 2002:aa7:c459:: with SMTP id n25mr358262edr.214.1611851166771; Thu, 28 Jan 2021 08:26:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611851166; cv=none; d=google.com; s=arc-20160816; b=TYOjU/G54zy4aOtCjH5stojd8sW0QfzXotuq4LAcj30Pyc6evf2s68lutZSbzwZGAr p/YQoIDssYcMBjSV8WfjuQs5AKl6jtyN8DXl/iEq6CoY9w5Hb7jrarYs9lu8HQvb1Sz+ 4B+SSjvGAC8r15WukbN2Bbwt1uA2igNpjN/P+/6YcyYQXmG63XGKw7M3pK0KwQeoL8RL /lKLHXbWyaPt/fx0COqjzIqIB5O8ueemeQZ4GVqfnKHQ5Gvv2ZWb+koPJcmmgHvlCh2t /o6ATb32kvq/by/6IpYVVPKaXwzHVPeSmvUYajO3+5OhTSbVwBbZxJj7UXFR4kGaqVVg rd8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WWmcYeElb62qutT0Kcoo6xDCdrj66eelF83EHgFDfB4=; b=dcLSTn7p6Rvjo0zWKxtV/ntz9fZkY8YZiQYfj4MYWRprLkXnl/7vke1+yJJ4CZECXQ UFxg/2+HflGUXqDXRyQYHrlBi5hWBEwfkkbBQQHjTRBvKHv/3YGeA57UUsIKMV0t+FoJ QuOSip1jkLlCtvFC9E4dwDxw7OMyLTIJiQh21fdNfomkoXKHy559rT0SSJ5TzB4PzVVI QpPZxQ/HH0pORFBBXQJxz7+UkNIjh/j0Oy3nH6BrHTBUdg9gW+X39Fm+bbEJKUh7KOv7 aL5tC8z+MAqt4d14yAqF7eaJuhdHk1VU8D1FxSAP0XX0RFmloSeITIJQ7lIcnDeWpaom r0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ZJlUD8pQ; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp8si2722445ejb.654.2021.01.28.08.25.41; Thu, 28 Jan 2021 08:26:06 -0800 (PST) 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; dkim=pass header.i=@suse.com header.s=susede1 header.b=ZJlUD8pQ; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232359AbhA1QYs (ORCPT + 99 others); Thu, 28 Jan 2021 11:24:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:53964 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbhA1QYq (ORCPT ); Thu, 28 Jan 2021 11:24:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1611851039; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WWmcYeElb62qutT0Kcoo6xDCdrj66eelF83EHgFDfB4=; b=ZJlUD8pQK2nIX/Cnj1UyvowYIjPxyyZKq5kI8NYKzxJt5tEqE9314CXd37wDkUTpPEa6Vf YEZQtVEmaZg8j88rldXEzhTt3tU4zmyFht8LR4yeM3dwIAsKI4509bn1BlnRgtEZNO+G8l DXrH4A5dU/j38+v0Vo5e/8cwta9YIu0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A6C7DAC41; Thu, 28 Jan 2021 16:23:59 +0000 (UTC) Date: Thu, 28 Jan 2021 17:23:58 +0100 From: Michal Hocko To: Christoph Lameter Cc: Mike Rapoport , David Hildenbrand , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org, Hagen Paul Pfeifer , Palmer Dabbelt Subject: Re: [PATCH v16 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation Message-ID: References: <20210121122723.3446-1-rppt@kernel.org> <20210121122723.3446-8-rppt@kernel.org> <20210126114657.GL827@dhcp22.suse.cz> <303f348d-e494-e386-d1f5-14505b5da254@redhat.com> <20210126120823.GM827@dhcp22.suse.cz> <20210128092259.GB242749@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 28-01-21 15:56:36, Cristopher Lameter wrote: > On Thu, 28 Jan 2021, Michal Hocko wrote: > > > > > If you kill the allocating process then yes, it would work, but your > > > > process might be the very last to be selected. > > > > > > OOMs are different if you have a "constrained allocation". In that case it > > > is the fault of the process who wanted memory with certain conditions. > > > That memory is not available. General memory is available though. In that > > > case the allocating process is killed. > > > > I do not see this implementation would do anything like that. Neither > > anything like that implemented in the oom killer. Constrained > > allocations (cpusets/memcg/mempolicy) only do restrict their selection > > to processes which belong to the same domain. So I am not really sure > > what you are referring to. The is only a global knob to _always_ kill > > the allocating process on OOM. > > Constrained allocations refer to allocations where the NUMA nodes are > restricted or something else does not allow the use of arbitrary memory. > The OOM killer changes its behavior. Yes as described in the above paragraph. > In the past we fell back to killing the calling process. Yeah, but this is no longer the case since 6f48d0ebd907a (more than 10 years ago. Anyway this is not really important because if you want to kill the allocating task because there is no chance the fault can succed then there is a SIGBUS as already mentioned. -- Michal Hocko SUSE Labs