On 08.10.2007 [18:56:05 -0700], Christoph Lameter wrote:It seems like I would zonelist_node_idx() for this, along the lines of: static nodemask_t *nodemask_thisnode(nodemask_t *nodemask, struct zonelist *zonelist) { int nid = zonelist_node_idx(zonelist); /* Build a nodemask for just this node */ nodes_clear(*nodemask); node_set(nid, *nodemask); return nodemask; } But I think I need to check that zonelist->_zonerefs->zone is !NULL, given this definition of zonelist_node_idx() static inline int zonelist_node_idx(struct zoneref *zoneref) { #ifdef CONFIG_NUMA /* zone_to_nid not available in this context */ return zoneref->zone->node; #else return 0; #endif /* CONFIG_NUMA */ } and this comment in __alloc_pages_internal(): .... z = zonelist->_zonerefs; /* the list of zones suitable for gfp_mask */ if (unlikely(!z->zone)) { /* * Happens if we have an empty zonelist as a result of * GFP_THISNODE being used on a memoryless node */ return NULL; } ... It seems like zoneref->zone may be NULL in zonelist_node_idx()? Maybe someone else should look into resolving this :) Thanks, Nish -- Nishanth Aravamudan <nacc@us.ibm.com> IBM Linux Technology Center -
| Maciej Rutecki | [2.6.26.*] boot problem (ahci/irq related?) |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Tony Lindgren | [PATCH 32/90] ARM: OMAP: Basic support for siemens sx1 |
| Renato S. Yamane | Error -71 on device descriptor read/all |
git: | |
| Francis Moreau | What about git cp ? |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| James B. Byrne | GiT and CentOS 5.2 |
| Matthieu Moy | git push to a non-bare repository |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jim Razmus | Re: Trouble ticket system suggestions |
| Calomel | Re: Light HTTP servers. |
| Brian Keefer | Re: Testing in a virtual environment |
| Matt Mackall | [PATCH] Stop scaring users with "treason uncloaked!" |
| Kunsheng Chen | Is there any function similar to inet_ntoa() in Kernel or NetFilter ? |
| Saverio Mascolo | TCP default congestion control in linux should be newreno |
| Johann Baudy | [PATCH] Packet socket: mmapped IO: PACKET_TX_RING |
