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 B81AAC433EF for ; Tue, 26 Oct 2021 07:03:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 63CF760E8B for ; Tue, 26 Oct 2021 07:03:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 63CF760E8B 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 D1D22940008; Tue, 26 Oct 2021 03:03:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CCDCB940007; Tue, 26 Oct 2021 03:03:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBB6A940008; Tue, 26 Oct 2021 03:03:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id AA187940007 for ; Tue, 26 Oct 2021 03:03:06 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B90662C6B4 for ; Tue, 26 Oct 2021 07:03:04 +0000 (UTC) X-FDA: 78737696688.07.3550792 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf26.hostedemail.com (Postfix) with ESMTP id 24E4320019E2 for ; Tue, 26 Oct 2021 07:03:05 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3CAA121957; Tue, 26 Oct 2021 07:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1635231782; 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=Mq9APL2CfqMqjGpYMi+6mlPHzzLvKocGw0zALcVBOW0=; b=QsMNOfPPbHPZ6065oUYV7TFulmvKfp2P+adQeHhtlfwDxkqwJ7UZe5vLBzffqj4jjEYHoN IowE3CSDu+DCuODpoF1WfnuK66SAfBuao8H8OLTK94KcXEIJDxLoupoNMc+8vaevHmeHOt 4sSMvc3b1l8i6shOwqSusLLYuR7nZrw= 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 relay2.suse.de (Postfix) with ESMTPS id EAB4BA3B8C; Tue, 26 Oct 2021 07:03:01 +0000 (UTC) Date: Tue, 26 Oct 2021 09:03:01 +0200 From: Michal Hocko To: NeilBrown Cc: linux-mm@kvack.org, Dave Chinner , Andrew Morton , Christoph Hellwig , Uladzislau Rezki , linux-fsdevel@vger.kernel.org, LKML , Ilya Dryomov , Jeff Layton Subject: Re: [PATCH 2/4] mm/vmalloc: add support for __GFP_NOFAIL Message-ID: References: <20211025150223.13621-1-mhocko@kernel.org> <20211025150223.13621-3-mhocko@kernel.org> <163520277623.16092.15759069160856953654@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <163520277623.16092.15759069160856953654@noble.neil.brown.name> X-Stat-Signature: 41hzrrypefenmzxemynkc1jk4pota5uw X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 24E4320019E2 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=QsMNOfPP; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf26.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1635231785-843981 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 Tue 26-10-21 09:59:36, Neil Brown wrote: > On Tue, 26 Oct 2021, Michal Hocko wrote: [...] > > @@ -3032,6 +3036,10 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, > > warn_alloc(gfp_mask, NULL, > > "vmalloc error: size %lu, vm_struct allocation failed", > > real_size); > > + if (gfp_mask & __GFP_NOFAIL) { > > + schedule_timeout_uninterruptible(1); > > + goto again; > > + } > > Shouldn't the retry happen *before* the warning? I've done it after to catch the "depleted or fragmented" vmalloc space. This is not related to the memory available and therefore it won't be handled by the oom killer. The error message shouldn't imply the vmalloc allocation failure IMHO but I am open to suggestions. -- Michal Hocko SUSE Labs