lkml.org 
[lkml]   [2004]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: NUMA API for Linux
> Instead of looking up a page's node number by
> page_zone(p)->zone_pgdat->node_id, you can get the same information much
> more efficiently by doing some bit-twidling on page->flags. Use
> page_nodenum(struct page *) from include/linux/mm.h.

Never noticed that before - I'd prefer we renamed this to page_to_nid
before anyone starts using it ... fits with the naming convention of
everything else (pfn_to_nid, etc). Nobody uses it right now - I grepped
the whole tree.

M.

diff -aurpN -X /home/fletch/.diff.exclude virgin/include/linux/mm.h name_nids/include/linux/mm.h
--- virgin/include/linux/mm.h Wed Mar 17 07:33:09 2004
+++ name_nids/include/linux/mm.h Thu Apr 8 22:27:24 2004
@@ -340,7 +340,7 @@ static inline unsigned long page_zonenum
{
return (page->flags >> NODEZONE_SHIFT) & (~(~0UL << ZONES_SHIFT));
}
-static inline unsigned long page_nodenum(struct page *page)
+static inline unsigned long page_to_nid(struct page *page)
{
return (page->flags >> (NODEZONE_SHIFT + ZONES_SHIFT));
}




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.061 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site