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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FC92C433F5 for ; Mon, 29 Nov 2021 08:56:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 23B496B0071; Mon, 29 Nov 2021 03:56:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1EA8A6B0072; Mon, 29 Nov 2021 03:56:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B4856B0073; Mon, 29 Nov 2021 03:56:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id F21506B0071 for ; Mon, 29 Nov 2021 03:56:16 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A936489D4E for ; Mon, 29 Nov 2021 08:56:06 +0000 (UTC) X-FDA: 78861360732.02.E444238 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf11.hostedemail.com (Postfix) with ESMTP id 2BF68F00020E for ; Mon, 29 Nov 2021 08:56:05 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id E335F1FCA1; Mon, 29 Nov 2021 08:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638176164; 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=46Ewntptqey7Nb8utRTMlE0lWeg1WoxNDUViibdnCTQ=; b=mQjNkj4jddg4aAzRNLHJfaGwJ9uhFcRto/6bZ/e/rW57sitgY4Nz87XFj54rTjwqRQxf4f 3K4eXNUCQR6sNb29av8NWaWHsPdTdNpYpo02lPBRoLQcxUYq6Jj6xtJug58QthhbfDt1T2 0DSHofD1aQaGV/q7sDV+E7i4aSoNOaQ= 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 B0D28A3B81; Mon, 29 Nov 2021 08:56:04 +0000 (UTC) Date: Mon, 29 Nov 2021 09:56:04 +0100 From: Michal Hocko To: Andrew Morton Cc: Dave Chinner , Neil Brown , Christoph Hellwig , Uladzislau Rezki , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, LKML , Ilya Dryomov , Jeff Layton Subject: Re: [PATCH v2 2/4] mm/vmalloc: add support for __GFP_NOFAIL Message-ID: References: <20211122153233.9924-1-mhocko@kernel.org> <20211122153233.9924-3-mhocko@kernel.org> <20211127160043.1512b4063f30b4d043b37420@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211127160043.1512b4063f30b4d043b37420@linux-foundation.org> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2BF68F00020E X-Stat-Signature: bys3mqu1jzkbmo51whc4d9nz6bhze8an Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=mQjNkj4j; spf=pass (imf11.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1638176165-900300 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 Sat 27-11-21 16:00:43, Andrew Morton wrote: > On Fri, 26 Nov 2021 11:48:46 +0100 Michal Hocko wrote: > > > On Mon 22-11-21 16:32:31, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Dave Chinner has mentioned that some of the xfs code would benefit from > > > kvmalloc support for __GFP_NOFAIL because they have allocations that > > > cannot fail and they do not fit into a single page. > > > > > > The large part of the vmalloc implementation already complies with the > > > given gfp flags so there is no work for those to be done. The area > > > and page table allocations are an exception to that. Implement a retry > > > loop for those. > > > > > > Add a short sleep before retrying. 1 jiffy is a completely random > > > timeout. Ideally the retry would wait for an explicit event - e.g. > > > a change to the vmalloc space change if the failure was caused by > > > the space fragmentation or depletion. But there are multiple different > > > reasons to retry and this could become much more complex. Keep the retry > > > simple for now and just sleep to prevent from hogging CPUs. > > > > > > Signed-off-by: Michal Hocko > > > > Are there still any concerns around this patch or the approach in > > general? > > Well. Like GFP_NOFAIL, every use is a sin. But I don't think I've > ever seen a real-world report of anyone hitting GFP_NOFAIL's > theoretical issues. I am not sure what you mean here. If you are missing real GFP_NOFAIL use cases then some have been mentioned in the discussion > I assume there will be a v3? Currently I do not have any follow up changes on top of neither of the patch except for acks and review tags. I can repost with those if you prefer. -- Michal Hocko SUSE Labs