lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Jan 2013 13:56:12 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mel Gorman <mgorman@...e.de>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Simon Jeons <simon.jeons@...il.com>,
	Wanpeng Li <liwanp@...ux.vnet.ibm.com>,
	Hugh Dickins <hughd@...gle.com>, Linux-MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/6] mm: Fold page->_last_nid into page->flags where
 possible

On Wed, 23 Jan 2013 14:25:07 +0000
Mel Gorman <mgorman@...e.de> wrote:

> On Tue, Jan 22, 2013 at 02:46:59PM -0800, Andrew Morton wrote:
> > 
> > reset_page_last_nid() is poorly named.  page_reset_last_nid() would be
> > better, and consistent.
> > 
> 
> Look at this closer, are you sure you want? Why is page_reset_last_nid()
> better or more consistent?

I was looking at this group:

static inline int page_xchg_last_nid(struct page *page, int nid)
static inline int page_last_nid(struct page *page)
static inline void reset_page_last_nid(struct page *page)

IMO the best naming for these would be page_nid_xchg_last(),
page_nid_last() and page_nid_reset_last().

> The getter functions for page-related fields start with page (page_count,
> page_mapcount etc.) but the setters begin with set (set_page_section,
> set_page_zone, set_page_links etc.). For mapcount, we also have
> reset_page_mapcount() so to me reset_page_last_nid() is already
> consistent.

But those schemes make no sense.

I don't see any benefit in being consistent with existing
inconsistency.  It's better to use good naming for new things and to
fix up the old things where practical.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ