linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Eric Wheeler <bcache@lists.ewheeler.net>
Cc: Andrea Tomassetti <andrea.tomassetti-opensource@devo.com>,
	Bcache Linux <linux-bcache@vger.kernel.org>
Subject: Re: Unusual value of optimal_io_size prevents bcache initialization
Date: Tue, 26 Sep 2023 23:37:14 +0800	[thread overview]
Message-ID: <EA8BF47E-F728-4A80-A07E-CD5A38935490@suse.de> (raw)
In-Reply-To: <8e19179-342d-6449-8c9-531fe3fbd16@ewheeler.net>



> 2023年9月26日 04:41,Eric Wheeler <bcache@lists.ewheeler.net> 写道:
>> 

[snipped]

>> 
>>>>> Another consideration, stripe_sectors_dirty and full_dirty_stripes, the two
>>>>> arrays allocated using n, are being used just in writeback mode, is this
>>>>> correct? In my specific case, I'm not planning to use writeback mode so I
>>>>> would expect bcache to not even try to create those arrays. Or, at least, to
>>>>> not create them during initialization but just in case of a change in the
>>>>> working mode (i.e. write-through -> writeback).
>>>> Indeed, Mingzhe Zou (if I remember correctly) submitted a patch for this
>>>> idea, but it is blocked by other depending patches which are not finished
>>>> by me. Yes I like the idea to dynamically allocate/free d->stripe_sectors_dirty
>>>> and d->full_dirty_stripes when they are necessary. I hope I may help to make
>>>> the change go into upstream sooner.
>>>> I will post a patch for your testing.
>>> This would be great! Thank you very much! On the other side, if there's anything I can do to help I would be glad to contribute.
>> 
>> I will post a simple patch for the reported memory allocation failure for you to test soon.
>> 
>> Thanks.
>> 
>> Coly Li
>> 
>> 
> 
> 
> Hi Coly and Andrea:
> 
> Years ago I wrote a patch to make stripe_size and 
> partial_stripes_expensive configurable:
> 
> https://lore.kernel.org/lkml/yq1fspvq99j.fsf@ca-mkp.ca.oracle.com/T/
> 
> A modern version of this could be merged with bcache-tools support. There 
> are still RAID controllers that either do not report io_opt, and Andrea's 
> issue highlights the problem with io_opt being too small.

We should try best to avoid the on-disk format change, before adding new member into bcache super block a new incompatible feature bit is required, other wise old format running on new kernel will be problematic. I replied this in the original discussion.

And adding a sysfs interface to change the bcache stripe size might introduce more unnecessary troubles. IMHO I’d prefer to increase the minimal bcache stripe size which still may work fine with writeback code.

Coly Li



  reply	other threads:[~2023-09-26 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 13:26 Unusual value of optimal_io_size prevents bcache initialization Andrea Tomassetti
2023-09-22 14:22 ` Coly Li
2023-09-23 14:29   ` Andrea Tomassetti
2023-09-24 14:06     ` Coly Li
2023-09-25 20:41       ` Eric Wheeler
2023-09-26 15:37         ` Coly Li [this message]
2023-09-26 15:28       ` Coly Li
2023-09-26 20:53         ` Eric Wheeler
2023-09-27 12:37           ` [EXTERNAL] " Andrea Tomassetti
2023-09-27 12:52           ` Coly Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EA8BF47E-F728-4A80-A07E-CD5A38935490@suse.de \
    --to=colyli@suse.de \
    --cc=andrea.tomassetti-opensource@devo.com \
    --cc=bcache@lists.ewheeler.net \
    --cc=linux-bcache@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).