On Mon, Jul 01, 2013 at 06:45:03PM +0000, Christoph Lameter wrote: >On Thu, 27 Jun 2013, Wanpeng Li wrote: > >> Enough slabs are queued in partial list to avoid pounding the page allocator >> excessively. Entire free slabs are not discarded immediately if there are not >> enough slabs in partial list(n->partial < s->min_partial). The number of total >> slabs is composed by the number of active slabs and the number of entire free >> slabs, however, the current logic of slub implementation ignore this which lead >> to the number of active slabs and the number of total slabs in slabtop message >> is always equal. This patch fix it by substract the number of entire free slabs >> in partial list when caculate active slabs. > >What do you mean by "active" slabs? If this excludes the small number of >empty slabs that could be present then indeed you will not have that >number. But why do you need that? > >The number of total slabs is the number of partial slabs, plus the number >of full slabs plus the number of percpu slabs. Before patch: Active / Total Slabs (% used) : 59018 / 59018 (100.0%) After patch: Active / Total Slabs (% used) : 11086 / 11153 (99.4%) These numbers are dump from slabtop for monitor slub, before patch Active / Total Slabs are always 100%, this is not truth since empty slabs present. However, the slab allocator can caculate its Active / Total Slabs correctly and its value is less than 100.0%. By comparison, slub is more efficient than slab through slabtop observation, however, it is not truth since slub uncorrectly calculate its Active / Total Slabs. Regards, Wanpeng Li -- 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>