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 55FCCC433EF for ; Sun, 28 Nov 2021 00:01:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51E406B0075; Sat, 27 Nov 2021 19:01:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A4756B0078; Sat, 27 Nov 2021 19:01:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31E216B007B; Sat, 27 Nov 2021 19:01:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 1B5276B0075 for ; Sat, 27 Nov 2021 19:01:00 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C5FE6183531C3 for ; Sun, 28 Nov 2021 00:00:49 +0000 (UTC) X-FDA: 78856383060.29.2EF83FB Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf27.hostedemail.com (Postfix) with ESMTP id D0CC77001946 for ; Sun, 28 Nov 2021 00:00:47 +0000 (UTC) Received: from mail.kernel.org (unknown [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 56E1BB80B23; Sun, 28 Nov 2021 00:00:47 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7694C60524; Sun, 28 Nov 2021 00:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1638057645; bh=ACnKnpkJp86UAT/IzmO/5pupb8wbug1WfQxQApH4b0s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PF1wUCGNXY1sMgZa0gBpVZ2HtoNHBG/0jfxX7MCJNWMvbwV80vZXKtT7TQObIgJJk wqYR9ictxr7uzDlLLsWrog2cWds5VFXhPKzILgOxM7n5WBUXLWujf5CTXIrrvDER8L jJllZL44TbYhvV1aKPrLAaJsk5PmYVBQiYk4LFUQ= Date: Sat, 27 Nov 2021 16:00:43 -0800 From: Andrew Morton To: Michal Hocko 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: <20211127160043.1512b4063f30b4d043b37420@linux-foundation.org> In-Reply-To: References: <20211122153233.9924-1-mhocko@kernel.org> <20211122153233.9924-3-mhocko@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D0CC77001946 X-Stat-Signature: pgds4yxojp44m8na4ktkqdu1tiwnn6k6 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=PF1wUCGN; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1638057647-730302 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 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 assume there will be a v3?