Samuel Thibault <samuel.thiba...@gnu.org> writes: > Maksym Planeta, le Sun 08 Apr 2012 00:48:18 +0300, a écrit : >> > Existing conditions, agreed. But the conditions you introduce are about >> > one-level only. >> >> Really, but I can replace 3 conditions from the beginning of commit with >> one. Would it fit? > > That would be simpler, yes. > >> >> Also you will need to allocate memory map for every object is created >> >> even it would not ever use pageout. >> > >> > Well, that's already what we do in pager_alloc, don't we? >> > >> >> Than I'd rather removed initialization of map from pager_alloc, because, >> I think, there is no sense to consume space for map if object doesn't >> use it. > > Then let's do it. It's better to make it clear that map can be NULL > right from the start, and not just cope with some case that seldomly > happens. It also helps making sure all codepaths are fixed. >
OK. > BTW, I guess the #if 0 you added around "XXX we know how kalloc.c works; > avoid copying." means that the optimization is actually bogus nowadays? > No, it isn't bogus and should work, but as it is hack that relies on implementation and how it works is not obvious (at least from my point of view), I decided to disable it. Do you think that it should be returned? Regards, Maksym Planeta.