Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp524135pxb; Thu, 5 Nov 2020 06:27:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOFwfT/lrQwc5knFdRkT/QdP2bBNTPNRTxV0MDMnb8qgUC2bDT0yeDXoZgeWCCFH4onFpF X-Received: by 2002:a05:6402:10c7:: with SMTP id p7mr2825187edu.34.1604586422998; Thu, 05 Nov 2020 06:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604586422; cv=none; d=google.com; s=arc-20160816; b=AnSDH49i10/50qrh4e2KrmzOBjzn0/tTBalDUjfx1jww2Z/9TRC55n1G1PP16pR6jT swV58hZEpdT6hFAiJLhg6L6JbPEv483xvQz78UaSYV50mVn58LSytMwnTlaN9xFugFyA tpQIcn5zde2NTNRbWq0rs38AhOlC9TWnJywmaYYjKiTWK0YwA3jyP8I/92krwWvm2x48 0UH9uL0ZK5rMl7KIqoNJ7rVHUrnZAw/sVptp17jW8WtEJ+3pU0XVY3befG00WPT5UU6G glQoApDB1IygkOiwu49wWef4igmurM3F3rYdL+wcO18H4wkBC1NeKPD1MJi+fxXSEqHI Jvtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject; bh=AQQIdH5wD7YzhfBixCo6I33z+4VFoHjGHIEq6EYDeMk=; b=F3Hdnx/Rmp5jdvZE8x7fh68CyRLaZLUVhmhdGFum/gka+OTfHjcCYAzVVSxpecl4Iy rJJa+8fe2K/F/AyHH6v5ONLdx13lmX2dM6uJRdnDfXYjAcb5h+Ku7yTBBTcbDgEIzNf1 GusscgcZ97s2LmyfQlLmFOx9acEXvD1DiA1i09YssNO6qVnSGVyxuF1zffL3z2Edt8Ol YgyU51HJspSZBOeWn6qJyqiTfPeBXTfu96kT6kXZdIWbNbHGJZ2GIeM2wn7TC7OukDbq r0p8Gf4yRDzVbvwV5pAoE4VoJw5fIjobhfiQEmHcQsTq0wLoRGoiMqdWCD8kun6kNfM8 fddQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt13si1247321ejb.259.2020.11.05.06.26.38; Thu, 05 Nov 2020 06:27:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730930AbgKEOXX (ORCPT + 99 others); Thu, 5 Nov 2020 09:23:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:48792 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbgKEOXU (ORCPT ); Thu, 5 Nov 2020 09:23:20 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E6B1CB02D; Thu, 5 Nov 2020 14:23:17 +0000 (UTC) Subject: Re: [PATCH] bcache: make writeback_cutoff and writeback_cutoff_sync writeable To: Dongdong Tao Cc: dongdong.tao@canonical.com, Kent Overstreet , "open list:BCACHE (BLOCK LAYER CACHE)" , open list References: <20201105141939.9223-1-tdd21151186@gmail.com> From: Coly Li Autocrypt: addr=colyli@suse.de; keydata= mQINBFYX6S8BEAC9VSamb2aiMTQREFXK4K/W7nGnAinca7MRuFUD4JqWMJ9FakNRd/E0v30F qvZ2YWpidPjaIxHwu3u9tmLKqS+2vnP0k7PRHXBYbtZE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AAmAhsMFiEE6j5FL/T5SGCN6PrQxzkHk2t9+PwFAl+NH1oFCSWn OqsACgkQxzkHk2t9+Pxfcg/7BmYgKbn2ktw8BtcwvgWwhBO/slTQ/P1l821danfbWNlnAAe7 TeI0GyjyUIyK9LXZYd+6hKLxduPadLcqpZjMLrLKN8po9N2izVmuudtAYxUWa1JW9K5tF6CR E9nKcye/ufRmrC8tX5Lc6R+QUcvxAoLacKNbheQegMlK3zJQGI90Z+Rp6SRsu0aRGKVsAZX3 gE5Mjp9G5/vuNbLEW4twQGNcoHiHz5fje9hoR0LY+jp50LuN8FM6Quf408MRZlNccpa8f9m9 2upo5Ia4Zc7rUD/79Q2ki/6N84urbJvSMtBsxIqzO37bB8Y+hdfD4TYxoI9l/gVaGjtFecVw 6Bjt5yBB80iGpoZyZZJ0vp1w7zSkTpkqbdazRqtyNJ1R36w9K1AxufcIJLs+zpv5re6hVH8C WuhK1qi/vvlQfCwtcLT7HSZV3pAUGTIA5cwbD1ovOoxMXVroBIeP/ZLribroIann/v/lgrFW b0A0UoUg9nhxgVCz8/QI1OrUvrqzyxH4u7panmmKBJJR96vUN987+oRz7xL/qsYbHDxK3W20 DhgHCP6dy5uI4KEg4qnhDsiztCXnEcf9/GMWVsbhDbD3wC4rtd9K87A91o355LaYRcQsMpvT wtm7c03bcpGf2e+avIMc+VQLd2PnSce2vpnsIEGulHBQfIGpTJP9mC8+qO4= Message-ID: <14dd22de-030e-c7af-494b-a4317afeb795@suse.de> Date: Thu, 5 Nov 2020 22:23:12 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201105141939.9223-1-tdd21151186@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/11/5 22:19, Dongdong Tao wrote: > From: dongdong tao > > commit 9aaf51654672 ("bcache: make cutoff_writeback and > cutoff_writeback_sync tunable") intend to make these two option > configurable by user, but these two are still read-only. > > Signed-off-by: dongdong tao > --- > drivers/md/bcache/sysfs.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c > index 554e3afc9b68..81f4a681705c 100644 > --- a/drivers/md/bcache/sysfs.c > +++ b/drivers/md/bcache/sysfs.c > @@ -102,8 +102,8 @@ read_attribute(writeback_keys_done); > read_attribute(writeback_keys_failed); > read_attribute(io_errors); > read_attribute(congested); > -read_attribute(cutoff_writeback); > -read_attribute(cutoff_writeback_sync); > +rw_attribute(cutoff_writeback); > +rw_attribute(cutoff_writeback_sync); > rw_attribute(congested_read_threshold_us); > rw_attribute(congested_write_threshold_us); > > @@ -902,6 +902,8 @@ STORE(__bch_cache_set) > sysfs_strtoul_bool(copy_gc_enabled, c->copy_gc_enabled); > sysfs_strtoul_bool(idle_max_writeback_rate, > c->idle_max_writeback_rate_enabled); > + sysfs_strtoul_clamp(cutoff_writeback, bch_cutoff_writeback, 1, 100); > + sysfs_strtoul_clamp(cutoff_writeback_sync, bch_cutoff_writeback_sync, 1, 100); > NACK, we only support the default value. Commit 9aaf51654672 ("bcache: make cutoff_writeback and cutoff_writeback_sync tunable") clearly announced the purpose was for research and experiment. Coly Li