From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E092C433F5 for ; Mon, 27 Sep 2021 11:08:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 41896610A2 for ; Mon, 27 Sep 2021 11:08:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 41896610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C2940900002; Mon, 27 Sep 2021 07:08:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD4B76B0072; Mon, 27 Sep 2021 07:08:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC334900002; Mon, 27 Sep 2021 07:08:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id 9C5EA6B0071 for ; Mon, 27 Sep 2021 07:08:36 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 44D112C59C for ; Mon, 27 Sep 2021 11:08:36 +0000 (UTC) X-FDA: 78633080232.34.9552694 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf05.hostedemail.com (Postfix) with ESMTP id E2E4B5066158 for ; Mon, 27 Sep 2021 11:08:35 +0000 (UTC) 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> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E2E4B5066158 X-Stat-Signature: mob3377k4enceaj6f1rcejeq4us4kfh8 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=kre7iUxO; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf05.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1632740915-471251 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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