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 ED1C4C433F5 for ; Fri, 22 Oct 2021 11:26:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A3B42610A4 for ; Fri, 22 Oct 2021 11:26:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A3B42610A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2C8A7900003; Fri, 22 Oct 2021 07:26:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29EFC900002; Fri, 22 Oct 2021 07:26:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B4F3900003; Fri, 22 Oct 2021 07:26:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id 0D20B900002 for ; Fri, 22 Oct 2021 07:26:42 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B7B54183CB093 for ; Fri, 22 Oct 2021 11:26:41 +0000 (UTC) X-FDA: 78723845802.14.C0BD4FF Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf22.hostedemail.com (Postfix) with ESMTP id 3201A1908 for ; Fri, 22 Oct 2021 11:26:40 +0000 (UTC) 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 CE4481FD58; Fri, 22 Oct 2021 11:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1634901999; 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: in-reply-to:in-reply-to:references:references; bh=G+CT6BgCtYpvdAl4MhY2kM2fLPV09SlNX2gZkJNaBZo=; b=DmdRpB0nz/eEkPbaRbG5oT04ItfX62+OAxSQO3vWI+pOdkBg8ek78HvN7hTZwHiZmd6hYU ZG3SCvUAk20HFuSn5Dr5gKZ3zbkw6/AXc1vGYMYgnnkz0WkD+T4o7qzvXNHwRJD8UN3dYK 3fFYIBkfAtqPoMqVMpzdBsCp7fcWfrs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1634901999; 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: in-reply-to:in-reply-to:references:references; bh=G+CT6BgCtYpvdAl4MhY2kM2fLPV09SlNX2gZkJNaBZo=; b=j7JodYggPkHHKNiWjC6WC+fc7I4Vca5MEAR7EZMkb/nSTIY9J28Lv4ZDsmbb/vE6GGh22S BhWLFwOhBNrySdDQ== 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 8228F13CD4; Fri, 22 Oct 2021 11:26:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EaZRDOqfcmHKIQAAMHmgww (envelope-from ); Fri, 22 Oct 2021 11:26:34 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Mel Gorman" Cc: "Andrew Morton" , "Theodore Ts'o" , "Andreas Dilger" , "Darrick J . Wong" , "Matthew Wilcox" , "Michal Hocko" , "Dave Chinner" , "Rik van Riel" , "Vlastimil Babka" , "Johannes Weiner" , "Jonathan Corbet" , "Linux-MM" , "Linux-fsdevel" , "LKML" Subject: Re: [PATCH v4 0/8] Remove dependency on congestion_wait in mm/ In-reply-to: <20211022083927.GI3959@techsingularity.net> References: <20211019090108.25501-1-mgorman@techsingularity.net>, <163486531001.17149.13533181049212473096@noble.neil.brown.name>, <20211022083927.GI3959@techsingularity.net> Date: Fri, 22 Oct 2021 22:26:30 +1100 Message-id: <163490199006.17149.17259708448207042563@noble.neil.brown.name> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 3201A1908 X-Stat-Signature: g3jwxbafod9y95uyffnoaf3sbf9obezu Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=DmdRpB0n; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=j7JodYgg; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf22.hostedemail.com: domain of neilb@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=neilb@suse.de X-HE-Tag: 1634902000-686516 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, 22 Oct 2021, Mel Gorman wrote: > On Fri, Oct 22, 2021 at 12:15:10PM +1100, NeilBrown wrote: > > > In general, I still don't like the use of wake_up_all(), though it won't > > cause incorrect behaviour. > > > > Removing wake_up_all would be tricky. I think there is a misunderstanding. Removing wake_up_all() is as simple as s/wake_up_all/wake_up/ If you used prepare_to_wait_exclusive(), then wake_up() would only wake one waiter, while wake_up_all() would wake all of them. As you use prepare_to_wait(), wake_up() will wake all waiters - as will wake_up_all(). When I see "wake_up_all()" I assume it is an exclusive wait, and that for some reason this particular wake_up needs to wake up all waiters. That is not the case here. I suspect it would be clearer if "wake_up" always woke everything, and "wake_up_one" was the special case - but unfortunately that isn't what we have. There are other non-exclusive waiters which use wake_up_all(), but the vast majority of wakeups use wake_up(), and most of those are for non-exclusive waiters. Thanks, NeilBrown