On 12/10/2013 02:00 PM, Christoph Lameter wrote: >> > We _need_ to share fields when the structure is handed between different >> > subsystems and it needs to be consistent in both places. For slab page >> > at least, the only data that actually gets used consistently is >> > page->flags. It seems silly to bend over backwards just to share a >> > single bitfield. > If you get corruption in one field then you need to figure out which other > subsystem could have accessed that field. Its not a single bitfield. There > are numerous relationships between the fields in struct page. I'm not saying that every 'struct page' user should get their own complete structure. I'm just saying that the *slabs* should get their own structure. Let's go through it field by field for the "normal" 'struct page' without debugging options: page->flags: shared by everybody, needs to be consistent for things like memory error handling mapping: unioned over by s_mem for slab index: unioned over by freelist for sl[oua]b _count: unioned over by lots of stuff by sl[oua]b lru: unioned over by lots of stuff by sl[oua]b, including another list_head called 'list' which blk-mq.c is now using. private: opaque storage anyway, but unioned over by sl[au]b See? *EVERYTHING* is overridden by at least one of the sl?b allocators except ->flags. In other words, there *ARE* no relationships when it comes to the sl?bs, except for page->flags. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>