Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3182546ybd; Mon, 24 Jun 2019 21:10:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5HSkB6SQ7JgxmOcPNTOxdYdREYnTP40shf52LipMEL5E2XUp5zCrvoxp8OFBEGNeM+Hx5 X-Received: by 2002:a65:6204:: with SMTP id d4mr36236471pgv.104.1561435816213; Mon, 24 Jun 2019 21:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435816; cv=none; d=google.com; s=arc-20160816; b=skVaJE5qBj3VPLIlg9kcLbupQ9LRPqM/brBKpUQNybzy9l0dtppgsUd5t9w9nvfth+ P1q/L1eOUDXNofq3dd5C7/pntShmKowqhv4RRy5BJyx0lZRw6ZInL3x3t8gim6WzM3yC BRy4z9rc80ayccU3+Laj1esfN1O2TTfF+IBmYEHVnkLoHsutxe0r3jidCr8b0LvKOPza osp1jWtaEq6GWm7FjnLF3htAyf4KHznhl0sMbKJJe6gDlaYeFJkxKEsGGASqOzk8drVk SUrRXlsOeUGBZTDuPpErTfApbvl9CY1e3URqV+1gz5mM2ajxE5YbzZvr4oTtzCc3OtPh NPyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:openpgp:from:references:cc:to:subject; bh=WinDGG6KfDvCNx+uPOYULC1K0cXoVw702kEVJzbkLkY=; b=IU0AS3s+iBI6jg1EoPOR8J/D4vOusjy0FZxl8THR/oXxaD5fvezsaBiTgOfILc5X7w S50r0dR/fqBGaI+1BeT1z93whEDkER6XGrz2DLEDeFungS55/omQcgEfhra8JqwFovzS vzLppFzlK1taS9sgOo+lPOzEPoonEMhdc1ZIH9udcnAMQi2/+9jn7vElWi+W/V/UcvS7 b++RSSxVbt2QK1pWPaT7DeiHzg260AnxEKTC+kmOF2v+CeD3bRSPy4X39mSKiRk96H3r vboQbiIA2Gf/e/903QyFmDluLWvx4L1Db0fEFjVyTp1zxUhPCWQ9A8I04C5Iu6ncW5kg 8X6A== 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 j4si10343390pfi.34.2019.06.24.21.10.00; Mon, 24 Jun 2019 21:10:16 -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 S1730285AbfFYB7e (ORCPT + 99 others); Mon, 24 Jun 2019 21:59:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:33656 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729601AbfFYB7d (ORCPT ); Mon, 24 Jun 2019 21:59:33 -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 071ACAB5F; Tue, 25 Jun 2019 01:59:31 +0000 (UTC) Subject: Re: [PATCH] bcache: make stripe_size configurable and persistent for hardware raid5/6 To: Eric Wheeler Cc: linux-block@vger.kernel.org, Jonathan Corbet , Kent Overstreet , "open list:DOCUMENTATION" , open list , "open list:BCACHE (BLOCK LAYER CACHE)" , "Martin K. Petersen" References: <1561245371-10235-1-git-send-email-bcache@lists.ewheeler.net> <200638b0-7cba-38b4-20c4-b325f3cfe862@suse.de> From: Coly Li Openpgp: preference=signencrypt Organization: SUSE Labs Message-ID: <8a9131dc-9bf7-a24a-f7b8-35e0c019e905@suse.de> Date: Tue, 25 Jun 2019 09:59:23 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-2022-jp Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/6/25 2:14 上午, Eric Wheeler wrote: > On Mon, 24 Jun 2019, Coly Li wrote: > >> On 2019/6/23 7:16 上午, Eric Wheeler wrote: >>> From: Eric Wheeler >>> >>> While some drivers set queue_limits.io_opt (e.g., md raid5), there are >>> currently no SCSI/RAID controller drivers that do. Previously stripe_size >>> and partial_stripes_expensive were read-only values and could not be >>> tuned by users (eg, for hardware RAID5/6). >>> >>> This patch enables users to save the optimal IO size via sysfs through >>> the backing device attributes stripe_size and partial_stripes_expensive >>> into the bcache superblock. >>> >>> Superblock changes are backwards-compatable: >>> >>> * partial_stripes_expensive: One bit was used in the superblock flags field >>> >>> * stripe_size: There are eight 64-bit "pad" fields for future use in >>> the superblock which default to 0; from those, 32-bits are now used >>> to save the stripe_size and load at device registration time. >>> >>> Signed-off-by: Eric Wheeler >> >> Hi Eric, >> >> In general I am OK with this patch. Since Peter comments lots of SCSI >> RAID devices reports a stripe width, could you please list the hardware >> raid devices which don't list stripe size ? Then we can make decision >> whether it is necessary to have such option enabled. > > Perhaps they do not set stripe_width using io_opt? I did a grep to see if > any of them did, but I didn't see them. How is stripe_width indicated by > RAID controllers? > > If they do set io_opt, then at least my Areca 1883 does not set io_opt as > of 4.19.x. I also have a LSI MegaRAID 3108 which does not report io_opt as > of 4.1.x, but that is an older kernel so maybe support has been added > since then. > > Martin, > > Where would stripe_width be configured in the SCSI drivers? Is it visible > through sysfs or debugfs so I can check my hardware support without > hacking debugging the kernel? > >> >> Another point is, this patch changes struct cache_sb, it is no problem >> to change on-disk format. I plan to update the super block version soon, >> to store more configuration persistently into super block. stripe_size >> can be added to cache_sb with other on-disk changes. > Hi Eric, > Maybe bumping version makes sense, but even if you do not, this is safe to > use on systems without bumping the version because the values are unused > and default to 0. Yes, I understand you, it works as you suggested. I need to think how to organize all options in struct cache_sb, stripe_size will be arranged then. And I will ask help to you for reviewing the changes of on-disk format. Thanks. [snipped] -- Coly Li