LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Bob Picco <bob.picco@hp.com>
Cc: linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] split file and anonymous page queues #2
Date: Tue, 20 Mar 2007 14:06:44 -0400 [thread overview]
Message-ID: <460022B4.4000509@redhat.com> (raw)
In-Reply-To: <20070320183927.GI10084@localhost>
Bob Picco wrote:
>> + /*
>> + * anon recent_rotated_anon
>> + * %anon = 100 * --------- / ------------------- * IO cost
>> + * anon+file recent_scanned_anon
>> + */
>> + anon_l = (anon_prio + 1) * (zone->recent_scanned_anon + 1);
>> + do_div(anon_l, (zone->recent_rotated_anon + 1));
>> +
>> + file_l = (file_prio + 1) * (zone->recent_scanned_file + 1);
>> + do_div(file_l, (zone->recent_rotated_file + 1));
>> +
>> + /* Normalize to percentages. */
>> + *anon_percent = (unsigned long)100 * anon_l / (anon_l + file_l);
> I believe this requires a do_div on 32 bit arch.
Actually, the "unsigned long long" is a holdover from the
code I had before. With the calculation above, I think I
can make it a simple "unsigned long" and get rid of the
do_div magic alltogether...
Btw, it would help if you could trim your replies. I almost
could not find your one line reply in-between the 1600 lines
of quoted text :)
--
All Rights Reversed
prev parent reply other threads:[~2007-03-20 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 0:52 [RFC][PATCH] split file and anonymous page queues #2 Rik van Riel
2007-03-20 1:06 ` Rik van Riel
2007-03-20 6:12 ` Nick Piggin
2007-03-20 12:27 ` Rik van Riel
2007-03-20 16:24 ` Lee Schermerhorn
2007-03-20 17:19 ` Rik van Riel
2007-03-20 18:39 ` Bob Picco
2007-03-20 18:06 ` Rik van Riel [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=460022B4.4000509@redhat.com \
--to=riel@redhat.com \
--cc=bob.picco@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).