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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C16DDC433EF for ; Wed, 25 May 2022 18:44:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbiEYSoS (ORCPT ); Wed, 25 May 2022 14:44:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233325AbiEYSoR (ORCPT ); Wed, 25 May 2022 14:44:17 -0400 Received: from mx.ewheeler.net (mx.ewheeler.net [173.205.220.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022DAA186; Wed, 25 May 2022 11:44:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mx.ewheeler.net (Postfix) with ESMTP id A065046; Wed, 25 May 2022 11:44:16 -0700 (PDT) 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 AGSuPP3Baxbp; Wed, 25 May 2022 11:44:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.ewheeler.net (Postfix) with ESMTPSA id 9037940; Wed, 25 May 2022 11:44:15 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mx.ewheeler.net 9037940 Date: Wed, 25 May 2022 11:44:01 -0700 (PDT) From: Eric Wheeler To: Christoph Hellwig cc: Keith Busch , Coly Li , Adriano Silva , Bcache Linux , Matthias Ferdinand , linux-block@vger.kernel.org Subject: Re: [RFC] Add sysctl option to drop disk flushes in bcache? (was: Bcache in writes direct with fsync) In-Reply-To: Message-ID: <77e7dbf9-d5bd-424-1ef7-8a1bb49e9010@ewheeler.net> References: <958894243.922478.1652201375900.ref@mail.yahoo.com> <958894243.922478.1652201375900@mail.yahoo.com> <9d59af25-d648-4777-a5c0-c38c246a9610@ewheeler.net> <27ef674d-67e-5739-d5d8-f4aa2887e9c2@ewheeler.net> <5486e421-b8d0-3063-4cb9-84e69c41b7a3@ewheeler.net> <7759781b-dac-7f84-ff42-86f4b1983ca1@ewheeler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org On Tue, 24 May 2022, Christoph Hellwig wrote: > On Tue, May 24, 2022 at 02:34:23PM -0700, Eric Wheeler wrote: > > Is this flag influced at all when /sys/block/sdX/queue/scheduler is set > > to "none", or does the write_cache flag operate independently of the > > selected scheduler? > > This is up to the stacking driver. dm and tend to pass through flushes > where needed. > > > This confirms what I have suspected all along: We have an LSI MegaRAID > > SAS-3516 where the write policy is "write back" in the LUN, but the cache > > is flagged in Linux as write-through: > > > > ]# cat /sys/block/sdb/queue/write_cache > > write through > > > > I guess this is the correct place to adjust that behavior! > > MegaRAID has had all kinds of unsafe policies in the past unfortunately. > I'm not even sure all of them could pass through flushes properly if we > asked them to :( Thanks for the feedback, great info! In your experience, which SAS/SATA RAID controllers are best behaved in terms of policies and reporting things like io_opt and writeback/writethrough to the kernel?