Re: [PATCH] x86: introduce bootmem_state

From: H. Peter Anvin
Date: Fri Mar 06 2009 - 19:15:28 EST


Jeremy Fitzhardinge wrote:

The total number of states is always going to be subsys1 * subsys2 * ..., but folding them all into one state variable only makes sense if we have a well-defined set of states *and* transitions between them. But even then it implies that we have enough coupling between our subsystems that we would even care what their aggregate state is, which is already a bad idea. If we keep the internal workings of our subsystems as internal details, then having private state variables is the way to go.

The real problem with system_state is that it has a few broadly-defined values, but no real explanation of what they mean, so they end up getting used in inappropriate ways (like the virt_addr_valid() thing I fixed yesterday).


Obviously.

-hpa

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