Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp98617ybd; Tue, 25 Jun 2019 17:23:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9upHTs2sDiol4ghur6lYUYtJc6oAKGF5GWc3Vbra1nPfE9lHjZL+yUdSyjM+C0k6JSB1S X-Received: by 2002:a63:f959:: with SMTP id q25mr22460993pgk.357.1561508612479; Tue, 25 Jun 2019 17:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561508612; cv=none; d=google.com; s=arc-20160816; b=gUnHyxf34MchNzfqncY8V8Tt1Viuvtw9L8MkItOmIjVmAiBXqwre7now8DPS7jzmre M6wERJdtPkMiHpAf14a1TQrPCXtSJY5ZwBZPCLG8IFVniM/xT2SLl2+5WnQPQvhntN7g f247uSH5bdc4ADFGg5rVsC1G3+ug3RGmJuwOZ1Vf8hxViIcsX85HQ+E86K5DSWJzHQdF h/A0Q7gghQ1jupGN6W3JbNm22xXkZflpFOQSw+BxP/aACkRxmHiOfIzQ2ebJbzqLYrJu Usa2LaUHbxNFOA8m+MMzcMawrASC1acc2b0ULqroCDTRyq4eTq2lNghmNAxNidWh0rdp +W/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=iyV0S+VWFqs9uclaO8NeS3RJLrRwRMKWbR5ESd3nVC4=; b=tdj92Tt4viIszW+/smTMln0I7kBeW/kLEfdNHPsX15Z5AeMx/ucDqhQcwAFCVkmH/y OZz03toZZVml9DBLFBriKP7o2dsStyuG9KPnWYxK0huE2/odMP7ewVgZZKXVfNFeyb4Q CNpAKsaEr7MrI1KKrAG9ssVb7g7JXC7Kqi647t3nqLbSpmIM+I4KitUordU97NtD++ZO oOTkqwuhm4GClLpVPPS4BezLL4GPsLTJqJJS0LpTLfnx5rFeIZDs8ustNg24IH7qVuvy 4VMmc5R0uvHl7Bywb+JvtdOy9AJmNINS2cqVUDdIhHgCYoIeb7nEZ1FLzYswKBXuWCyQ SCKw== 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 cx20si204575pjb.97.2019.06.25.17.23.15; Tue, 25 Jun 2019 17:23:32 -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 S1726334AbfFZAXL (ORCPT + 99 others); Tue, 25 Jun 2019 20:23:11 -0400 Received: from mx.ewheeler.net ([66.155.3.69]:47178 "EHLO mx.ewheeler.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfFZAXL (ORCPT ); Tue, 25 Jun 2019 20:23:11 -0400 Received: from localhost (localhost [127.0.0.1]) by mx.ewheeler.net (Postfix) with ESMTP id 439D3A0692; Wed, 26 Jun 2019 00:23:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at ewheeler.net Received: from mx.ewheeler.net ([127.0.0.1]) by localhost (mx.ewheeler.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XUUrvMZH-9KD; Wed, 26 Jun 2019 00:23:09 +0000 (UTC) Received: from mx.ewheeler.net (mx.ewheeler.net [66.155.3.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.ewheeler.net (Postfix) with ESMTPSA id 769DFA067D; Wed, 26 Jun 2019 00:23:09 +0000 (UTC) Date: Wed, 26 Jun 2019 00:23:09 +0000 (UTC) From: Eric Wheeler X-X-Sender: lists@mx.ewheeler.net To: "Martin K. Petersen" cc: Coly Li , linux-block@vger.kernel.org, Jonathan Corbet , Kent Overstreet , "open list\\:DOCUMENTATION" , open list , "open list\\:BCACHE \\(BLOCK LAYER CACHE\\)" Subject: Re: [PATCH] bcache: make stripe_size configurable and persistent for hardware raid5/6 In-Reply-To: Message-ID: References: <1561245371-10235-1-git-send-email-bcache@lists.ewheeler.net> <200638b0-7cba-38b4-20c4-b325f3cfe862@suse.de> User-Agent: Alpine 2.11 (LRH 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Jun 2019, Martin K. Petersen wrote: > > 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? > > The values are reported in the Block Limits VPD page for each SCSI block > device and are thus set by the SCSI disk driver. IOW, the RAID > controller device drivers have nothing to do with this. > > For RAID controllers specifically, the controller firmware will fill out > the VPD fields for each virtual SCSI disk when you configure a RAID > set. For pretty much everything else, the Block Limits come straight > from the device itself. > > Also note that these values aren't specific to RAID controllers at > all. Most new SCSI devices, including disk drives and SSDs, will fill > out the Block Limits VPD page one way or the other. Even some USB > storage devices are providing this page. Thanks, that makes sense. Interesting about USB. > > 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. > > I have several MegaRAIDs that all report it. But it depends on the > controller firmware. > > > Is it visible through sysfs or debugfs so I can check my hardware > > support without hacking debugging the kernel? > > To print the block device topology: > > # lsblk -t > > or look up io_opt in sysfs: > > # grep . /sys/block/sdX/queue/optimal_io_size > > You can also query a SCSI device's Block Limits directly: > > # sg_vpd -p bl /dev/sdX Perfect, thank you for that. I've tried the following controllers that I have access to. One worked (hspa/HP Gen8 Smart Array Controller), but the others I tried are not providing VPDs: * LSI 2108 (Supermicro) * LSI 3108 (Dell) * Areca 1882 * Areca 1883 * Fibrechannel 8gbe connected to a Storwize 3700 ~]# sg_vpd -p bl /dev/sdb VPD page=0xb0 fetching VPD page failed > If you want to tinker, you can simulate a SCSI disk with your choice of > io_opt: > > # modprobe scsi_debug opt_blks=N > > where N is the number of logical blocks to report as being the optimal > I/O size. Neat, thanks for the hint! -Eric > > -- > Martin K. Petersen Oracle Linux Engineering >