[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0811241140390.19930@chino.kir.corp.google.com>
Date: Mon, 24 Nov 2008 11:49:00 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Dave Chinner <david@...morbit.com>,
Christoph Lameter <cl@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [patch 1/2] mm: change dirty limit type specifiers to unsigned
long
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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists