From: jim owens <jowens@hp.com>
To: Josef Bacik <josef@redhat.com>
Cc: "Oliver Mattos" <oliver.mattos08@imperial.ac.uk>,
"Simon Holm Thøgersen" <odie@cs.aau.dk>,
"Yien Zheng" <esprout@gmail.com>,
"Jens Axboe" <jens.axboe@oracle.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: take block group fragmentation into account for allocation
Date: Mon, 09 Mar 2009 13:29:02 -0400 [thread overview]
Message-ID: <49B551DE.7040304@hp.com> (raw)
In-Reply-To: <20090309152417.GA31524@unused.rdu.redhat.com>
Josef Bacik wrote:
> On Mon, Mar 09, 2009 at 03:21:06PM -0000, Oliver Mattos wrote:
>>> So the idea of the function is to return an integer in the range
>>> [0,100]?
>> Why are we using a range of 0 to 100 anyway? 100 seems like an arbitary
>> value for kernel space - why not just keep it as a value in the range
>> [0,2^32) ? That eliminates the arbitary constant of 100, and in some
>> cases could reduce the effects of rounding and allow finer control at no
>> additional expense.
>>
>
> Its not arbitrary, its a percentage, so 0-100 percent.
True, however the decision to use a percentage scheme is arbitrary.
For triggers like this it is just as good to pick points
like 1/8 (12.5%) or 1/4 (25%) that can be calculated without
doing division. Forgetting the 32 bit architecture problem,
many architectures are really slow at divide so it is better
to not use them unless it adds real value. Other than percent
being easy to document, what is the justification for percent.
jim
next prev parent reply other threads:[~2009-03-09 17:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 14:42 [PATCH] Btrfs: take block group fragmentation into account for allocation Yien Zheng
2009-03-08 16:37 ` Jens Axboe
2009-03-09 2:03 ` Yien Zheng
2009-03-09 13:56 ` Simon Holm Thøgersen
2009-03-09 15:21 ` Oliver Mattos
2009-03-09 15:24 ` Josef Bacik
2009-03-09 17:29 ` jim owens [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-06 19:30 Josef Bacik
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=49B551DE.7040304@hp.com \
--to=jowens@hp.com \
--cc=esprout@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=odie@cs.aau.dk \
--cc=oliver.mattos08@imperial.ac.uk \
/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