From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()
Date: Sun, 24 Jul 2005 19:24:23 -0400 [thread overview]
Message-ID: <1122247463.8322.19.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1122246549.8322.3.camel@lade.trondhjem.org>
su den 24.07.2005 Klokka 19:09 (-0400) skreiv Trond Myklebust:
> su den 24.07.2005 Klokka 16:36 (+0200) skreiv Rene Scharfe:
> > [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()
> >
> > Function nfs_block_bits() an open-coded version of (the non-existing)
> > rounddown_pow_of_two(). That means that for non-power-of-two target
> > sizes it returns half the size needed for a block to fully contain
> > the target. I guess this is wrong. :-) The patch uses the built-in
> > roundup_pow_of_two() instead.
>
> What non-power-of-two target? Anything _not_ aligned to a power of two
> boundary is a BUG!
Furthermore, rounding UP in order to "correct" this non-alignment would
definitely be a bug.
If users choose to override the default rsize/wsize, that is almost
always in order to limit the UDP fragmentation per read/write request on
lossy networks. By rounding up, you are doubling the number of fragments
that the user requested instead of respecting the limit.
Cheers,
Trond
next prev parent reply other threads:[~2005-07-24 23:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-24 14:36 Rene Scharfe
2005-07-24 23:09 ` Trond Myklebust
2005-07-24 23:24 ` Trond Myklebust [this message]
2005-07-25 15:56 ` Rene Scharfe
2005-07-26 17:48 ` Trond Myklebust
2005-07-26 20:00 ` Peter Staubach
2005-07-26 20:42 ` Rene Scharfe
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=1122247463.8322.19.camel@lade.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.scharfe@lsrfire.ath.cx \
/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®