Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2199617ybl; Thu, 15 Aug 2019 08:05:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVrLNyoUAXpNhppRkxzTWUmJXwjntXXM7kkP95zE4a882iaRd2r2kGiYEMPGjNG3osEw1Y X-Received: by 2002:a63:8ac3:: with SMTP id y186mr3838292pgd.13.1565881505237; Thu, 15 Aug 2019 08:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565881505; cv=none; d=google.com; s=arc-20160816; b=wIk99eSWgsC9tWjX958T8HRJzLZRfj1cmVRz/41xitHkpivVCydM4NzZ21RkqKtrJo DVNOyJfTMfM5FpXYANUQv1MdV7fXQvuHxAChGZlcVV0REqFS3Qjmc0ck7AOYZogsMYZv MKttru/qTpqC//RhCVnZ38hf1tgz0tNrTlAtp0o4JsLESouk0vr0Btt84XMf91Rm2Zig 8mZ6GROVs3YjN95jAlIcYh/jxDRdi1MO55eUjC4yFpUiqgHtIdoqNHQMeybBFZ/b4w9o 2YmhQ1PZHPmt/rbUv+culPBOqskyQGmvS0nDKrSd8OYX/aWyqrzlu2i5+aeZNP6NTMFU nedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Yd+uh1SrKs+Urm0sD0QtzC+LJ8ERbXI9qCyR+ywU5ok=; b=mGJFaQd1Ril6F++vZ7Q986SyJqRAkXoaRCqcV2jrGiVvfnzZpj/ARPrKaG1tBOzH7w sOkQMRY0RgsvBefMR/cjttQ36IVye8SJCJMWWyscGT9y5S6vTNAagK2+45GuD0xrUwrQ ZGBXFjEeLFEPDl3rDpGzEafzEIdNaQ6CWhKdrJzi1wWkq0l9nJjbc+6Tk0Zg9CsaOM7p iuhAKtbbtWGNuNyOrtPintjntSPWiI2O7GKiiunzhc+qL9x5MDr1uVWEunpYgUbLsBSb CJA+vEjjXJPAcp2EysQ38slfdkEiZ0TKuGVZlUhGW2kw2y7tXXgQ2bW3g2GsiCm7QS97 0/Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si2103424pld.289.2019.08.15.08.04.47; Thu, 15 Aug 2019 08:05:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732521AbfHONs5 (ORCPT + 99 others); Thu, 15 Aug 2019 09:48:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:55786 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732504AbfHONsz (ORCPT ); Thu, 15 Aug 2019 09:48:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 14CD9AF9F; Thu, 15 Aug 2019 13:48:54 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 87ACA1E4200; Thu, 15 Aug 2019 15:48:53 +0200 (CEST) Date: Thu, 15 Aug 2019 15:48:53 +0200 From: Jan Kara To: Tejun Heo Cc: Jens Axboe , Jan Kara , linux-block@vger.kernel.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH block 1/2] writeback, cgroup: Adjust WB_FRN_TIME_CUT_DIV to accelerate foreign inode switching Message-ID: <20190815134853.GH14313@quack2.suse.cz> References: <20190802190738.GB136335@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802190738.GB136335@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 02-08-19 12:07:38, Tejun Heo wrote: > WB_FRN_TIME_CUT_DIV is used to tell the foreign inode detection logic > to ignore short writeback rounds to prevent getting confused by a > burst of short writebacks. The parameter is currently 2 meaning that > anything smaller than half of the running average writback duration > will be ignored. > > This is unnecessarily aggressive. The detection logic uses 16 history > slots and is already reasonably protected against some short bursts > confusing it and the current parameter can lead to tens of seconds of > missed detection depending on the writeback pattern. > > Let's change the parameter to 8, so that it only ignores writeback > with are smaller than 12.5% of the current running average. > > Signed-off-by: Tejun Heo Makes sense to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/fs-writeback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/fs/fs-writeback.c > +++ b/fs/fs-writeback.c > @@ -227,7 +227,7 @@ static void wb_wait_for_completion(struc > /* parameters for foreign inode detection, see wb_detach_inode() */ > #define WB_FRN_TIME_SHIFT 13 /* 1s = 2^13, upto 8 secs w/ 16bit */ > #define WB_FRN_TIME_AVG_SHIFT 3 /* avg = avg * 7/8 + new * 1/8 */ > -#define WB_FRN_TIME_CUT_DIV 2 /* ignore rounds < avg / 2 */ > +#define WB_FRN_TIME_CUT_DIV 8 /* ignore rounds < avg / 8 */ > #define WB_FRN_TIME_PERIOD (2 * (1 << WB_FRN_TIME_SHIFT)) /* 2s */ > > #define WB_FRN_HIST_SLOTS 16 /* inode->i_wb_frn_history is 16bit */ -- Jan Kara SUSE Labs, CR