I replied to Mike and Alan yesterday evening but it does not show in the archives. I am assuming it got lost and I am resending. Sorry if this is a duplicate.
> If vmcp is called with a buffer of 1M and the last slab in > /proc/buddyinfo is 0, would it not be reasonable to nudge > the kernel to free at least one slot up, assuming this can be done safely? > So there's no point in nudging the kernel to do a Hail Mary attempt to > find more memory. If it were available, the slab count would already be > 0. As I understand it from the time I was researching this, /proc/buddyinfo shows the current state of the slab cache. Since the kernel uses a large amount of memory for caches and buffers and these are ready to be freed when needed, a zero slab count does not necessarilly mean that a call needing that slab will fail. The kernel does several rounds of freeing and rearranging memory to find or construct a suitable slab. I looked at this in kernel 2.6 and it may have changed, but there the algorithm was different for slabs with size lesser than 32k: for those it tried even harder to free memory. I also remember there was some time limit on the freeing, if the kernel did not free the memoryin time, it failed. So a vmcp failure happens when there are zero free slabs and the kernel fails to free enough continuous memory. I guess you can end up with freeing a lot and still have enough fragmentation not to be able to find a large slab. Where the s390 is different is that it uses large continuous buffers all over. The rest of Linux tries to use smaller or discontinuous buffers which may be why the kernel mainline is not bothered by problems with reclaiming larger slabs. So the question for the VM/zLinux devs could be whether the diag that allows Linux to make CP calls could be changed to return partial data or do something else in order to not use a large buffer. Tomas ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
