Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp254238pxb; Mon, 13 Sep 2021 18:29:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfMcq038rdr3w7mIKUkWUZhv3Xu4n3MGTGTqTffy8imB/QDpwRKcdU75Qo3qyOG7bMY3iR X-Received: by 2002:a05:6402:51d2:: with SMTP id r18mr9074487edd.108.1631582943982; Mon, 13 Sep 2021 18:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631582943; cv=none; d=google.com; s=arc-20160816; b=BQ2yOwxqgmrpFjqarEZLAEoBFJqy4l3zc7d1Oifn5l779j3qXCcPPFy5p5W+9j3XHh RvUZ988uSecKSwqiUp8ZetfAAIdV+qJ9ZF/zh3Qu960lZb3xUos8fJjxB1opU/nW+KHU 1e5sEMu4F5jBtmR2NldsPvJIbeCA9yseZlZkyrAXcHmHfQQ3JiNR/p8PM1h9bOvrQRyV Sz/FTTnf4+1wuFD11RFWBUBdjUNbkVGVJaPUsVoVLOjvRylEvmV+5ExN8hD9QuY/VYZQ v/KHiIHLO0huof10BIyg/h0BnntyI9wvXIcme3rmB52pa6X1JgKSeLL4W2OFPhcoCOqW vjvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:cc:subject:date:to:from:dkim-signature :dkim-signature; bh=PFbh9I08qiRIpx/LwQHrN9x2N5uOULjufRHblHpoK4g=; b=C8w8fFh0i4ho61J7qVj2wMh7ZNaKnBtYtR5+7SSIQ2Ex8lw5lHE+tQNgduYmOyzIEL WFWInFEEPkgWPcERF6p5gqAKann13bdizvNjU6SSZHQBdIWCS2kW8mwY/J2gRTIIg8qU T/HuZL+rbzIZH/WE69iWOZhzGtnoDigMP10msOo6XL1aEt+PkdBaYQiNxXO+R+bxx2R+ hK8/VgB8pfbcpYaQCxUrSX9CVYFnl2FMJL9FC0kvPUlhqJDnI6V9Nuv9XtV/DnbdMRx5 GJpDaoPrEG2pyivjbRUGm04ha/nERcqb0+e14sbIx1bQFh65+M+A/AjrToo6zjNLwJXG Sozw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=uuSgtJ0+; dkim=neutral (no key) header.i=@suse.de header.b=0FOlCmgm; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si5972006edb.415.2021.09.13.18.28.37; Mon, 13 Sep 2021 18:29:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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.de header.s=susede2_rsa header.b=uuSgtJ0+; dkim=neutral (no key) header.i=@suse.de header.b=0FOlCmgm; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238025AbhINA26 (ORCPT + 99 others); Mon, 13 Sep 2021 20:28:58 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:55030 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236554AbhINA26 (ORCPT ); Mon, 13 Sep 2021 20:28:58 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1FDF8200AB; Tue, 14 Sep 2021 00:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1631579260; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFbh9I08qiRIpx/LwQHrN9x2N5uOULjufRHblHpoK4g=; b=uuSgtJ0+FRAjj4cM0Uw3gizAGdSOZ9KZJdQa8Xe47I5rWpB/k4+CBglCk9ze0+ku71h0Kj DLOGlj0TJIV61exkhj/GiPT941q/fF9d5QndRC2KIKAtbsWDv1tpN5woiO3T0qT26hW9qR 4D8sFiwSqMqGDl+rMHe/VXOuaFh4drI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1631579260; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFbh9I08qiRIpx/LwQHrN9x2N5uOULjufRHblHpoK4g=; b=0FOlCmgmDR5J/+kI3Q4QjdyDlONqJLexEA9naFbBESq2iYI7TMeUTBl0wf8j5qeuc63GzD MaW4gs77K7fW/GDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B074513ADE; Tue, 14 Sep 2021 00:27:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4YCuG3jsP2ECawAAMHmgww (envelope-from ); Tue, 14 Sep 2021 00:27:36 +0000 From: NeilBrown To: Andrew Morton , Theodore Ts'o , Andreas Dilger , "Darrick J. Wong" , Matthew Wilcox , Mel Gorman Date: Tue, 14 Sep 2021 10:13:04 +1000 Subject: [PATCH 0/6] congestion_wait() and GFP_NOFAIL Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <163157808321.13293.486682642188075090.stgit@noble.brown> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org While working on an NFS issue recently I was informed (or maybe "reminded") that congestion_wait() doesn't really do what we think it does. It is indistinguishable from schedule_timeout_uninterruptible(). Some current users for congestion_wait() would be better suited by __GFP_NOFAIL. In related discussions it was pointed out that the __GFP_NOFAIL documentation could usefully clarify the costs of its use. So this set of patch addresses some of these issues. The patches are all independent and can safely be applied separately in different tress as appropriate. They: - add or improve documentation relating to these issues - make a tiny fix to the page_alloc_bulk_* - replace those calls to congestion_wait() which are simply waiting to retry a memory allocation. These are the easy bits. There are 5 calls to congestion_wait() and one to wait_iff_congested() in mm/ which need consideration. There are multiple calls to congestion_wait in fs/, particularly fs/f2fs/ which need to be addressed too. I'll try to form an opinion about these in coming weeks. Thanks, NeilBrown --- NeilBrown (6): MM: improve documentation for __GFP_NOFAIL MM: annotate congestion_wait() and wait_iff_congested() as ineffective. EXT4: Remove ENOMEM/congestion_wait() loops. EXT4: remove congestion_wait from ext4_bio_write_page, and simplify XFS: remove congestion_wait() loop from kmem_alloc() XFS: remove congestion_wait() loop from xfs_buf_alloc_pages() fs/ext4/ext4.h | 2 +- fs/ext4/ext4_jbd2.c | 8 +++++- fs/ext4/extents.c | 49 ++++++++++++++----------------------- fs/ext4/extents_status.c | 35 ++++++++++++++------------ fs/ext4/extents_status.h | 2 +- fs/ext4/indirect.c | 2 +- fs/ext4/inode.c | 6 ++--- fs/ext4/ioctl.c | 4 +-- fs/ext4/page-io.c | 13 ++++------ fs/ext4/super.c | 2 +- fs/jbd2/transaction.c | 8 +++--- fs/xfs/kmem.c | 16 +++--------- fs/xfs/xfs_buf.c | 6 ++--- include/linux/backing-dev.h | 7 ++++++ mm/backing-dev.c | 9 +++++++ 15 files changed, 86 insertions(+), 83 deletions(-) -- Signature