[Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

Johannes Weiner hannes at cmpxchg.org
Mon Dec 7 10:02:25 PST 2015


On Mon, Dec 07, 2015 at 06:04:35PM +0100, Michal Hocko wrote:
> Yes but the counter is an internal thing to the MM and the outside code
> should have no business in manipulating it directly.

The counter has been global scope forever. If you want to encapsulate
it, send a patch yourself and make your case in the changelog.  There
is no reason to make people with reasonable working code jump through
your personal preference hoops that have little to do with what their
patch is pursuing.

That being said, I'd NAK any patch that would turn a trivial accessor
like this into a full-blown function. Our interfaces encapsulate for
convenience, not out of distrust and bad faith.


More information about the Intel-gfx mailing list