Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3849035pxb; Mon, 27 Sep 2021 04:09:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdkUPlQpj3tbtHK3wYWZoZ8//IXa9dxpqwUhZg4ExN6UMabAdN9CGFnfcFj0WH2Gq9ASV3 X-Received: by 2002:a65:580d:: with SMTP id g13mr2099847pgr.233.1632740992328; Mon, 27 Sep 2021 04:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632740992; cv=none; d=google.com; s=arc-20160816; b=YSRaj8oXS+lJ5OAeJzNNyPnw/SmttdJ1vDsNojbLKB3TOYPseeVzE5HerDXzoA8mNV lewTs+v5rGt193MWjBEaKB9jC9vFnGfmue0ez6aGgFLcTtIWBxE4ynBgVNW6ijhDNUlj yb/OagewIfPiNYR3ej3E3rBLIHWZErzC1+42ENzHyEZqUr57nSIKktCofk0V/mcbaKAR fPjbTm30J5TAI3QFdfds9Z0DjGTFvRVPQFsGP+xYftyGL46vYcKAeCrwAfOqfAro9LRp Nq2JoLxHYNCEzTMFkbNcAsxmiymcGSgUUs+fMghNQnp1ZpVksPPAXjL/BszXuAEw1ECj 2Tvg== 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=T0gN5P8Lx7ZyiqATEPAc473z/z83jxXVuqiEZE6U3VQ=; b=TlvUHLIWqUC+1Ui3D7bsIVVQBmTK8zVXL4MZVvd2vdb4b7igwCRl/IB5854iwnWNK4 FDxMz5VLmWb70betzLXWJjQvbrwysPvufS4iY1d1sp/zZjIC+XS7n0OrlmXIvIrk6MoJ VacZoCi7CxTkHv2YWbHhOhwaHTJl1sYiz+LSVQtQt/bi/kQANSXNQ25kXR5vjMHN/CEJ AQ1OD8BpvhVwsXRve82l6u9fu6vIbE5NH57zHxQ4tO6dhCwq8NSaVc0aw1ruNW0QAr8o /Q3QvcvsfEqHCOC/dIbUnVITa3j9iwkAxSBN9W/pOvDgNMWfUEESBCYhuYRw8TADwT8Q RiNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=kre7iUxO; 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 y201si8692371pfb.337.2021.09.27.04.09.39; Mon, 27 Sep 2021 04:09:52 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=kre7iUxO; 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 S233973AbhI0LKQ (ORCPT + 99 others); Mon, 27 Sep 2021 07:10:16 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:53012 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233959AbhI0LKN (ORCPT ); Mon, 27 Sep 2021 07:10:13 -0400 Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) by smtp-out1.suse.de (Postfix) with ESMTP id 7EB52220A1; Mon, 27 Sep 2021 11:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1632740914; 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=T0gN5P8Lx7ZyiqATEPAc473z/z83jxXVuqiEZE6U3VQ=; b=kre7iUxOWUIgYgzzKUhzw0x2WCHgHzMCUOqVIBpZ+x/aVr1dRjiWLufEXpDi/CmGC1TYI1 px71aSp6Y8Zv4RfWxdoH2HFaiQnu6Shv0Ar9v2hzsX4tQvCY2YXDp53YHRpvaMi3o5GqQV TZ9vAVbHiIdSUzPF8ML3FYKqjacgdVY= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay1.suse.de (Postfix) with ESMTPS id EC5EB25D3C; Mon, 27 Sep 2021 11:08:33 +0000 (UTC) Date: Mon, 27 Sep 2021 13:08:33 +0200 From: Michal Hocko To: Vasily Averin Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Tetsuo Handa , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org Subject: Re: [PATCH mm] vmalloc: back off when the current task is OOM-killed Message-ID: References: <508abe37-a044-7180-ac67-b4ce5e4cc149@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <508abe37-a044-7180-ac67-b4ce5e4cc149@virtuozzo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 27-09-21 12:36:15, Vasily Averin wrote: > On 9/24/21 10:55 AM, Michal Hocko wrote: > > On Thu 23-09-21 09:49:57, Vasily Averin wrote: [...] > >> Hypothetically, cancelled vmalloc called inside some filesystem's transaction > >> forces its rollback, that in own turn it can call own vmalloc. > > > > Do you have any specific example? > > No, it was pure hypothetical assumption. > I was thinking about it over the weekend, and decided that: > a) such kind of issue (i.e. vmalloc call in rollback after failed vmalloc) > is very unlikely > b) if it still exists -- it must have own failback with kmalloc(NOFAIL) > or just accept/ignore such failure and should not lead to critical failures. > If this still happen -- ihis is a bug, we should detect and fix it ASAP. I would even argue that nobody should rely on vmalloc suceeding. The purpose of the allocator is to allow larger allocations and we do not guarantee anything even for small reqests. > >> Should we perhaps interrupt the first vmalloc only? > > > > This doesn't make much sense to me TBH. It doesn't address the very > > problem you are describing in the changelog. > > Last question: > how do you think, should we perhaps, instead, detect such vmallocs > (called in rollback after failed vmalloc) and generate a warnings, > to prevent such kind of problems in future? We do provide an allocation failure splat unless the request is explicitly __GFP_NOWARN IIRC. -- Michal Hocko SUSE Labs