From: David Rientjes <rientjes@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
Christoph Lameter <cl@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/2] mm: change dirty limit type specifiers to unsigned long
Date: Mon, 24 Nov 2008 11:49:00 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.0811241140390.19930@chino.kir.corp.google.com> (raw)
In-Reply-To: <1227554201.4259.538.camel@twins>
On Mon, 24 Nov 2008, Peter Zijlstra wrote:
> This didn't pop up any weird and wonderfull assumptions on the
> signed-ness of these variables I take it :-)
>
It didn't; in fact, callers already used them as though they were
unsigned. For example, bdi_debug_stats_show():
seq_printf(m,
"BdiDirtyThresh: %8lu kB\n"
"DirtyThresh: %8lu kB\n"
"BackgroundThresh: %8lu kB\n",
K(bdi_thresh),
K(dirty_thresh),
K(background_thresh));
And get_dirty_limits() itself implicitly uses an unsigned type specifier
for the long *pbdi_dirty limit:
if (bdi) {
u64 bdi_dirty;
...
*pbdi_dirty = bdi_dirty;
}
And, given that the remainder of the get_dirty_limits() callers simply use
these for comparisons to the ZVC global_page_state() values, which are
also unsigned long, this conversion is safe.
Thanks Peter!
prev parent reply other threads:[~2008-11-24 19:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 18:55 David Rientjes
2008-11-23 18:55 ` [patch 2/2] mm: add dirty_background_bytes and dirty_bytes sysctls David Rientjes
2008-11-24 19:15 ` Peter Zijlstra
2008-11-24 23:38 ` Andrew Morton
2008-11-25 0:52 ` Randy Dunlap
2008-11-25 1:05 ` David Rientjes
2008-11-25 1:00 ` David Rientjes
2009-02-01 1:22 ` [PATCH] mm: Fix dirty_bytes/dirty_background_bytes sysctls on 64bit arches Sven Wegener
2009-02-01 9:19 ` Peter Zijlstra
2009-02-01 10:22 ` Sven Wegener
2009-02-02 0:26 ` David Rientjes
2008-11-24 19:16 ` [patch 1/2] mm: change dirty limit type specifiers to unsigned long Peter Zijlstra
2008-11-24 19:49 ` David Rientjes [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=alpine.DEB.2.00.0811241140390.19930@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®