mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiao Ni <xni@redhat.com>
To: Chris Unkel <cunkel@drivescale.com>
Cc: linux-raid <linux-raid@vger.kernel.org>,
	Song Liu <song@kernel.org>, Christoph Hellwig <hch@infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] md superblock write alignment on 512e devices
Date: Thu, 5 Nov 2020 11:29:58 +0800	[thread overview]
Message-ID: <df5a45c9-d286-11af-c206-b0ef5bff79ea@redhat.com> (raw)
In-Reply-To: <CAHFUYDo23BBq0R5mZBZgcCEzE=rN_ZYHCZp5WEs-nBZwYeyEnA@mail.gmail.com>



On 11/04/2020 04:12 AM, Chris Unkel wrote:
> Hi Xiao,
>
> Thanks for the excellent feedback.  Since bitmap_offset appears to be
> a free-form field, it wasn't apparent to me that the bitmap never
> starts within 4K of the bitmap.
>
> I don't think it's worth worrying about a logical block size that's
> more than 4K here--from what I can see logical block size larger than
> the usual 4K page isn't going to happen.
>
> I do think that it makes sense to handle the case where the physical
> block size is more than 4K.  I think what you propose works, but I
> think in the physical block > MAX_SB_SIZE case it makes more sense to
> align the superblock writes to the physical block size (as now) rather
Is it a typo error? You want to say if physical block > MAX_SB_SIZE, it 
should align the
superblock writes to logical block size? Because I see the comments 
below, your solution
is to align to logical block size when physical block > MAX_SB_SIZE.
> than rejecting the create/assemble.  Mounting with the possible
> performance hit seems like a better outcome for the user in that case
> than refusing to assemble.
> It's the same check that would have to be written to reject the
> assembly in that case and so the code shouldn't really be any more
> complex.
>
> So basically what I propose is:  if the physical block size is no
> larger than MAX_SB_SIZE, pad to that; otherwise pad to to
> logical_block_size, that is, replace queue_logical_block_size()
> with something equivalent to:
>
>      queue_physical_block_size(...) > MAX_SB_SIZE ?
> queue_logical_block_size(...) : queue_physical_block_size(...)
>
> which is simple, safe in all cases, doesn't reject any feasible
> assembly, and generates aligned sb writes on all common current
> devices (512n,4kn,512e.)
>
> What do you think?
Yes, It's a nice solution :)

Regards
Xiao


      reply	other threads:[~2020-11-05  3:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 20:13 Christopher Unkel
2020-10-29 20:13 ` [PATCH v2 1/3] md: factor out repeated sb alignment logic Christopher Unkel
2020-10-29 20:13 ` [PATCH 2/3] md: align superblock writes to physical blocks Christopher Unkel
2020-11-02  8:02   ` Xiao Ni
2020-10-29 20:13 ` [PATCH 3/3] md: reuse sb length-checking logic Christopher Unkel
2020-11-02  7:42 ` [PATCH v2 0/3] md superblock write alignment on 512e devices Xiao Ni
2020-11-03 20:12   ` Chris Unkel
2020-11-05  3:29     ` Xiao Ni [this message]

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=df5a45c9-d286-11af-c206-b0ef5bff79ea@redhat.com \
    --to=xni@redhat.com \
    --cc=cunkel@drivescale.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@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

all inboxes | Powered by JetHome®