All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Christoph Hellwig <hch@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>,
	dm-devel@redhat.com, linux-block <linux-block@vger.kernel.org>,
	Alasdair G Kergon <agk@redhat.com>,
	AliOS system security <alios_sys_security@linux.alibaba.com>,
	Colin Ian King <colin.king@canonical.com>,
	Eric Biggers <ebiggers@google.com>,
	Heinz Mauelshagen <heinzm@redhat.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Milan Broz <gmazyland@gmail.com>,
	Nikos Tsironis <ntsironis@arrikto.com>,
	Shenghui Wang <shhuiw@foxmail.com>,
	Sweet Tea <sweettea@redhat.com>,
	wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
Subject: Re: [git pull] device mapper changes for 4.21
Date: Thu, 3 Jan 2019 08:45:27 +0100	[thread overview]
Message-ID: <b527fb75-340e-c3ba-7cc7-97dd466e6780@gmail.com> (raw)
In-Reply-To: <20190103072754.GA2667@infradead.org>

On 03/01/2019 08:27, Christoph Hellwig wrote:
> On Sun, Dec 30, 2018 at 04:25:46PM -0800, Linus Torvalds wrote:
>> On Sun, Dec 30, 2018 at 11:15 AM Mikulas Patocka <mpatocka@redhat.com> wrote:
>>>
>>> But you're right that 2TiB devices are common and that perhaps this option
>>> should go away.
>>
>> 2TiB devices are definitely not common in the one situation where this
>> option might matter: small embedded devices.
>>
>> I don't think the cost of 64 bit is in the arithmetic, but it might be
>> in some of the data structures.
>>
>> But my gut feel is that it probably doesn't much matter, and we could
>> get rid of the config option without anybody ever noticing. I don't
>> think we have that many data structures with 'sector_t' in them.
>>
>> We might try to first just force the option on, and see if anybody even cares.
> 
> Our smallest embedded devices use raw flash using the MTD subsystem,
> and even that is using 64-bit size types everywhere.  So I'd be really
> surprised if it is an issue.

I agree with Christoph here.

(I fixed some CONFIG_LBDAF problems in DM in this pull request because
the code was apparently wrong, but it was a pain to see all these possible
sector overflow checks...)

If it helps anything, we require 64-bit calculations for cryptsetup userspace for >5 years
(you cannot compile it with 32bit support; everything uses 64bit, including these
DM table sector calculations for kernel) and NOBODY complained since we enforced it.
(Ok, it is not a hot path, but....)

Please, if possible, go with 64-bit sector size types by default in future.

Thanks,
Milan

WARNING: multiple messages have this Message-ID (diff)
From: Milan Broz <gmazyland@gmail.com>
To: Christoph Hellwig <hch@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sweet Tea <sweettea@redhat.com>,
	wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>,
	AliOS system security <alios_sys_security@linux.alibaba.com>,
	Nikos Tsironis <ntsironis@arrikto.com>,
	Mike Snitzer <snitzer@redhat.com>,
	Eric Biggers <ebiggers@google.com>,
	Heinz Mauelshagen <heinzm@redhat.com>,
	Shenghui Wang <shhuiw@foxmail.com>,
	linux-block <linux-block@vger.kernel.org>,
	dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Colin Ian King <colin.king@canonical.com>,
	Milan Broz <gmazyland@gmail.com>,
	Alasdair G Kergon <agk@redhat.com>
Subject: Re: [git pull] device mapper changes for 4.21
Date: Thu, 3 Jan 2019 08:45:27 +0100	[thread overview]
Message-ID: <b527fb75-340e-c3ba-7cc7-97dd466e6780@gmail.com> (raw)
In-Reply-To: <20190103072754.GA2667@infradead.org>

On 03/01/2019 08:27, Christoph Hellwig wrote:
> On Sun, Dec 30, 2018 at 04:25:46PM -0800, Linus Torvalds wrote:
>> On Sun, Dec 30, 2018 at 11:15 AM Mikulas Patocka <mpatocka@redhat.com> wrote:
>>>
>>> But you're right that 2TiB devices are common and that perhaps this option
>>> should go away.
>>
>> 2TiB devices are definitely not common in the one situation where this
>> option might matter: small embedded devices.
>>
>> I don't think the cost of 64 bit is in the arithmetic, but it might be
>> in some of the data structures.
>>
>> But my gut feel is that it probably doesn't much matter, and we could
>> get rid of the config option without anybody ever noticing. I don't
>> think we have that many data structures with 'sector_t' in them.
>>
>> We might try to first just force the option on, and see if anybody even cares.
> 
> Our smallest embedded devices use raw flash using the MTD subsystem,
> and even that is using 64-bit size types everywhere.  So I'd be really
> surprised if it is an issue.

I agree with Christoph here.

(I fixed some CONFIG_LBDAF problems in DM in this pull request because
the code was apparently wrong, but it was a pain to see all these possible
sector overflow checks...)

If it helps anything, we require 64-bit calculations for cryptsetup userspace for >5 years
(you cannot compile it with 32bit support; everything uses 64bit, including these
DM table sector calculations for kernel) and NOBODY complained since we enforced it.
(Ok, it is not a hot path, but....)

Please, if possible, go with 64-bit sector size types by default in future.

Thanks,
Milan

  reply	other threads:[~2019-01-03  7:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 16:09 [git pull] device mapper changes for 4.21 Mike Snitzer
2018-12-27 16:09 ` Mike Snitzer
2018-12-29  1:30 ` pr-tracker-bot
2018-12-29  1:30   ` pr-tracker-bot
2018-12-30  9:06 ` Christoph Hellwig
2018-12-30  9:06   ` Christoph Hellwig
2018-12-30 19:15   ` Mikulas Patocka
2018-12-30 19:15     ` Mikulas Patocka
2018-12-31  0:25     ` Linus Torvalds
2018-12-31  0:25       ` Linus Torvalds
2019-01-03  7:27       ` Christoph Hellwig
2019-01-03  7:27         ` Christoph Hellwig
2019-01-03  7:45         ` Milan Broz [this message]
2019-01-03  7:45           ` Milan Broz
2018-12-30 19:40   ` James Bottomley
2018-12-30 19:40     ` James Bottomley
2018-12-31 20:10   ` Jens Axboe
2018-12-31 20:10     ` Jens Axboe

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=b527fb75-340e-c3ba-7cc7-97dd466e6780@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=agk@redhat.com \
    --cc=alios_sys_security@linux.alibaba.com \
    --cc=colin.king@canonical.com \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@google.com \
    --cc=hch@infradead.org \
    --cc=heinzm@redhat.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=ntsironis@arrikto.com \
    --cc=shhuiw@foxmail.com \
    --cc=snitzer@redhat.com \
    --cc=sweettea@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wuzhouhui14@mails.ucas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.