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 B3115C433EF for ; Thu, 26 May 2022 13:39:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 528798D0003; Thu, 26 May 2022 09:39:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4D36A8D0001; Thu, 26 May 2022 09:39:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39D5C8D0003; Thu, 26 May 2022 09:39:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 23C898D0001 for ; Thu, 26 May 2022 09:39:41 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E787220604 for ; Thu, 26 May 2022 13:39:40 +0000 (UTC) X-FDA: 79508001720.09.0CD5341 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf31.hostedemail.com (Postfix) with ESMTP id 0587220045 for ; Thu, 26 May 2022 13:39:03 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 836C41F8D6; Thu, 26 May 2022 13:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1653572378; 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=EXgsltI1EydYTLlZIVMiKvkGRiYB66sbbcE1wLmYWJM=; b=b+fUN704H2bSX5WCorToflDv4rxnd9dG/Pssx4gITvr/2G8VyQJkWT2dvl0tGI72bgBQ/r KAB08iupTTN9u8VHbKmrWQbmP7Rw12kePJURw8FHiymNxXjHCxO8XdLaEDUKaMQIi+T6Fo WMG0NgSHWJAYcOoKtn3IU+y5gtfyXz8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1653572378; 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=EXgsltI1EydYTLlZIVMiKvkGRiYB66sbbcE1wLmYWJM=; b=bXnW+z7Tqd/Ioj7YiGWNRgVoY6KeQ74/6Kdmx0kB5R27Bmq/Q4TGGl52873+ciniqGkczc 5NaLd3EYxuBjvyAg== Received: from quack3.suse.cz (unknown [10.100.224.230]) (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 3A6A22C141; Thu, 26 May 2022 13:39:38 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 88DC4A0632; Thu, 26 May 2022 15:39:37 +0200 (CEST) Date: Thu, 26 May 2022 15:39:37 +0200 From: Jan Kara To: Stefan Roesch Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz, hch@infradead.org Subject: Re: [PATCH v5 05/16] iomap: Add async buffered write support Message-ID: <20220526133937.a524uiczmiphzgxr@quack3.lan> References: <20220525223432.205676-1-shr@fb.com> <20220525223432.205676-6-shr@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220525223432.205676-6-shr@fb.com> X-Rspamd-Queue-Id: 0587220045 X-Stat-Signature: oqrdhm7jpfn8uwszhqt1643qb9tmtgxm Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=b+fUN704; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=bXnW+z7T; dmarc=none; spf=pass (imf31.hostedemail.com: domain of jack@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=jack@suse.cz X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1653572343-491827 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 Wed 25-05-22 15:34:21, Stefan Roesch wrote: > This adds async buffered write support to iomap. > > This replaces the call to balance_dirty_pages_ratelimited() with the > call to balance_dirty_pages_ratelimited_flags. This allows to specify if > the write request is async or not. > > In addition this also moves the above function call to the beginning of > the function. If the function call is at the end of the function and the > decision is made to throttle writes, then there is no request that > io-uring can wait on. By moving it to the beginning of the function, the > write request is not issued, but returns -EAGAIN instead. io-uring will > punt the request and process it in the io-worker. > > By moving the function call to the beginning of the function, the write > throttling will happen one page later. > > Signed-off-by: Stefan Roesch Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR