mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: bcrl@redhat.com, phillips@bonn-fries.net
Cc: Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org,
	torvalds@transmeta.com
Subject: Re: [PATCH] size-in-bytes
Date: Thu, 21 Feb 2002 10:54:44 +0100 (MET)	[thread overview]
Message-ID: <UTC200202210954.g1L9siM06287.aeb@apps.cwi.nl> (raw)

    From: Benjamin LaHaise <bcrl@redhat.com>

    Using the number of sectors in kernel is perhaps more efficient, but it 
    is a microoptimization that won't show up on any benchmarks.

Yes. Since we have to go to 64-bit anyway it is not more
space-efficient, but of course shifting over 3 positions
is slightly faster than shifting over 12 positions.
But as you say, timewise there is no measurable difference,
while the code becomes much simpler.

There is also the point that a block device need not have a size
that is an integral number of sectors. That is most obvious with
the loop device, but also occurs elsewhere.
The partition making ioctls (and the loop mount options) allow one
to give a starting offset in bytes.

Thus, there are applications where it is really useful to have
the precise size, rather than the approximate size in sectors.
Also nbd uses the size in bytes, while amiga uses 256-byte sectors.

Andries


             reply	other threads:[~2002-02-21  9:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-21  9:54 Andries.Brouwer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-02-18 23:29 Andries.Brouwer
2002-02-18 23:38 ` Daniel Phillips
2002-02-16 22:45 Andries.Brouwer
2002-02-16 23:10 ` Martin Dalecki
2002-02-16 21:41 Andries.Brouwer
2002-02-16 22:05 ` Martin Dalecki
2002-02-16 16:09 Andries.Brouwer
2002-02-16 21:09 ` Martin Dalecki
2002-02-18 22:43 ` Daniel Phillips
2002-02-21  7:04   ` Benjamin LaHaise

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=UTC200202210954.g1L9siM06287.aeb@apps.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@bonn-fries.net \
    --cc=torvalds@transmeta.com \
    /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®