From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 03/13] bcache: inherit the optimal I/O size Date: Mon, 21 Sep 2020 16:00:10 +0200 Message-ID: <20200921140010.GA14672@lst.de> References: <20200921080734.452759-1-hch@lst.de> <20200921080734.452759-4-hch@lst.de> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Coly Li Cc: Christoph Hellwig , Jens Axboe , Song Liu , Hans de Goede , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org, linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Sep 21, 2020 at 05:54:59PM +0800, Coly Li wrote: > I am not sure whether virtual bcache device's optimal request size can > be simply set like this. > > Most of time inherit backing device's optimal request size is fine, but > there are two exceptions, > - Read request hits on cache device > - User sets sequential_cuttoff as 0, all writing may go into cache > device firstly. > For the above two conditions, all I/Os goes into cache device, using > optimal request size of backing device might be improper. > > Just a guess, is it OK to set the optimal request size of the virtual > bcache device as the least common multiple of cache device's and backing > device's optimal request sizes ? Well, if the optimal I/O size is wrong, the read ahead size also is wrong. Can we just drop the setting? 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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6052DC43468 for ; Mon, 21 Sep 2020 14:00:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34DDB20866 for ; Mon, 21 Sep 2020 14:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbgIUOAR (ORCPT ); Mon, 21 Sep 2020 10:00:17 -0400 Received: from verein.lst.de ([213.95.11.211]:40145 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbgIUOAR (ORCPT ); Mon, 21 Sep 2020 10:00:17 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id A75DA68AFE; Mon, 21 Sep 2020 16:00:11 +0200 (CEST) Date: Mon, 21 Sep 2020 16:00:10 +0200 From: Christoph Hellwig To: Coly Li Cc: Christoph Hellwig , Jens Axboe , Song Liu , Hans de Goede , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd@lists.infradead.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [PATCH 03/13] bcache: inherit the optimal I/O size Message-ID: <20200921140010.GA14672@lst.de> References: <20200921080734.452759-1-hch@lst.de> <20200921080734.452759-4-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org On Mon, Sep 21, 2020 at 05:54:59PM +0800, Coly Li wrote: > I am not sure whether virtual bcache device's optimal request size can > be simply set like this. > > Most of time inherit backing device's optimal request size is fine, but > there are two exceptions, > - Read request hits on cache device > - User sets sequential_cuttoff as 0, all writing may go into cache > device firstly. > For the above two conditions, all I/Os goes into cache device, using > optimal request size of backing device might be improper. > > Just a guess, is it OK to set the optimal request size of the virtual > bcache device as the least common multiple of cache device's and backing > device's optimal request sizes ? Well, if the optimal I/O size is wrong, the read ahead size also is wrong. Can we just drop the setting? 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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64502C43465 for ; Mon, 21 Sep 2020 14:00:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2CE920756 for ; Mon, 21 Sep 2020 14:00:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ndMUtf+b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2CE920756 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UHJdQt2FolD0XaFQFBhbbALcDMoGxIuakPZnFpagmdM=; b=ndMUtf+bON3zPKRVCYXZVPmmO BdVCuHpqbxF+vHEWiYZSBtuD4rpjlskaDdgRoLClY56L2I74Dk343XoaBNkF+0oWvEqBroQTvv2RT 7nBBtGvoaQUUiu4UX82zygwicnR4IMcrNvtLhEiSb6pJKkBRTO2glcz4Wor4k+1tjyvBUdUvwyvfV p7PpyQTrvAta9ZY2NuSN2/ItQf2aRCUBUUfSHDjAgZCkQ/Ix78BJnKwAL4/Q9VBWZVQzHKfrpMteK tUbnu2uLj9espKlWP/ZAih/nhLM9DfktgBpa6HGK5V4oTS0oessKSpCI8nQH+BqjBoG64RWTSHDoS 1axEcGq3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKMMe-0006ig-EB; Mon, 21 Sep 2020 14:00:20 +0000 Received: from verein.lst.de ([213.95.11.211]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKMMZ-0006h5-NJ for linux-mtd@lists.infradead.org; Mon, 21 Sep 2020 14:00:17 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id A75DA68AFE; Mon, 21 Sep 2020 16:00:11 +0200 (CEST) Date: Mon, 21 Sep 2020 16:00:10 +0200 From: Christoph Hellwig To: Coly Li Subject: Re: [PATCH 03/13] bcache: inherit the optimal I/O size Message-ID: <20200921140010.GA14672@lst.de> References: <20200921080734.452759-1-hch@lst.de> <20200921080734.452759-4-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_100015_927724_ABA45661 X-CRM114-Status: GOOD ( 14.81 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , linux-raid@vger.kernel.org, Hans de Goede , Justin Sanders , Minchan Kim , Richard Weinberger , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Song Liu , dm-devel@redhat.com, linux-mtd@lists.infradead.org, linux-mm@kvack.org, Johannes Thumshirn , linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Christoph Hellwig , drbd-dev@lists.linbit.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Mon, Sep 21, 2020 at 05:54:59PM +0800, Coly Li wrote: > I am not sure whether virtual bcache device's optimal request size can > be simply set like this. > > Most of time inherit backing device's optimal request size is fine, but > there are two exceptions, > - Read request hits on cache device > - User sets sequential_cuttoff as 0, all writing may go into cache > device firstly. > For the above two conditions, all I/Os goes into cache device, using > optimal request size of backing device might be improper. > > Just a guess, is it OK to set the optimal request size of the virtual > bcache device as the least common multiple of cache device's and backing > device's optimal request sizes ? Well, if the optimal I/O size is wrong, the read ahead size also is wrong. Can we just drop the setting? ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 7BD3442082A for ; Mon, 21 Sep 2020 16:00:44 +0200 (CEST) Date: Mon, 21 Sep 2020 16:00:10 +0200 From: Christoph Hellwig To: Coly Li Message-ID: <20200921140010.GA14672@lst.de> References: <20200921080734.452759-1-hch@lst.de> <20200921080734.452759-4-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Jens Axboe , linux-raid@vger.kernel.org, Hans de Goede , Justin Sanders , Minchan Kim , Richard Weinberger , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Song Liu , dm-devel@redhat.com, linux-mtd@lists.infradead.org, linux-mm@kvack.org, Johannes Thumshirn , linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Christoph Hellwig , drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH 03/13] bcache: inherit the optimal I/O size List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Sep 21, 2020 at 05:54:59PM +0800, Coly Li wrote: > I am not sure whether virtual bcache device's optimal request size can > be simply set like this. > > Most of time inherit backing device's optimal request size is fine, but > there are two exceptions, > - Read request hits on cache device > - User sets sequential_cuttoff as 0, all writing may go into cache > device firstly. > For the above two conditions, all I/Os goes into cache device, using > optimal request size of backing device might be improper. > > Just a guess, is it OK to set the optimal request size of the virtual > bcache device as the least common multiple of cache device's and backing > device's optimal request sizes ? Well, if the optimal I/O size is wrong, the read ahead size also is wrong. Can we just drop the setting?