Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1454699

Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats
Date 2016-08-02 17:10 +0200
Message-ID <s1Juq-68b-43@gated-at.bofh.it> (permalink)
References <s1vB8-5dX-3@gated-at.bofh.it> <s1wdQ-5tW-3@gated-at.bofh.it> <s1xMC-6FX-7@gated-at.bofh.it> <s1xMC-6FX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hmm.... What SLUB does is:

1. Keep a count of the total number of allocated slab pages per node.
	This counter only needs to be updated when a slab page is
	allocated from the page allocator or when it is freed to the
	page allocator. At that point we already hold the per node lock,
	page allocator operations are extremely costly anyways and so that
	is ok.

2. Keep a count of the number of partially allocated slab pages per node.
	At that point we have to access the partial list and take a per
	node lock. Placing the counter into the same cacheline and
	the increment/decrement into the period when the lock has been taken
	avoids the overhead.

The number of full pages is then

	total - partial


If both allocators would use the same scheme here then the code to
maintain the counter can be moved into mm/slab_common.c. Plus the per node
structures could be mostly harmonized between both allocators. Maybe even
the page allocator operations could become common code.

Aruna: Could you work on a solution like that?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm/slab: Improve performance of gathering slabinfo stats Aruna Ramakrishna <aruna.ramakrishna@oracle.com> - 2016-08-02 02:20 +0200
  Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-08-02 03:00 +0200
    Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-08-02 04:40 +0200
      Re: [PATCH] mm/slab: Improve performance of gathering slabinfo  stats Christoph Lameter <cl@linux.com> - 2016-08-02 17:10 +0200
        Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats Aruna Ramakrishna <aruna.ramakrishna@oracle.com> - 2016-08-02 19:50 +0200
    Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats Aruna Ramakrishna <aruna.ramakrishna@oracle.com> - 2016-08-02 04:50 +0200

csiph-web