Messages in this thread | | | Date | Fri, 29 Oct 2010 09:55:08 -0500 (CDT) | From | Christoph Lameter <> | Subject | Re: [PATCH] numa: fix slab_node(MPOL_BIND) |
| |
On Thu, 28 Oct 2010, Andrew Morton wrote:
> On Thu, 28 Oct 2010 11:55:18 -0500 (CDT) > Christoph Lameter <cl@linux.com> wrote: > > > On Thu, 28 Oct 2010, Linus Torvalds wrote: > > > > > And so does - although less obviously - mm/vmscan.c for the > > > wait_iff_confgested() thing. > > > > > > So are those buggy too, since first_zones_zonelist() can apparently return NULL? > > > > The code is fine. > > > > first_zones_zonelist() can only return NULL for the case that a nodemask > > was specified and the code in vmscan.c does not specify a nodemask. > > Geeze, how did you work that out and how the heck was anyone else > supposed to know this :(
Look at the code and how it was modified by Lee. The initial assumption before his patch was that the zonelist contains all zones of the system. Therefore you will allways find all possible zone types in the system. The function did not contain a check for the end of the zonelist and does not now for the nodemask == NULL.
However, the modification to filter the zonelist then makes it possible to have subsets of zones not containing the requested zone types now. Therefore Lee added a check for the end of the zonelist for that case.
Could be better documented. Took me some staring at the code to figure it out.
| |