Jesper Dangaard Brouer
e6cdb58d1c
slab: implement bulk free in SLAB allocator
...
This patch implements the free side of bulk API for the SLAB allocator
kmem_cache_free_bulk(), and concludes the implementation of optimized
bulk API for SLAB allocator.
Benchmarked[1] cost of alloc+free (obj size 256 bytes) on CPU i7-4790K @
4.00GHz, with no debug options, no PREEMPT and CONFIG_MEMCG_KMEM=y but
no active user of kmemcg.
SLAB single alloc+free cost: 87 cycles(tsc) 21.814 ns with this
optimized config.
bulk- Current fallback - optimized SLAB bulk
1 - 102 cycles(tsc) 25.747 ns - 41 cycles(tsc) 10.490 ns - improved 59.8%
2 - 94 cycles(tsc) 23.546 ns - 26 cycles(tsc) 6.567 ns - improved 72.3%
3 - 92 cycles(tsc) 23.127 ns - 20 cycles(tsc) 5.244 ns - improved 78.3%
4 - 90 cycles(tsc) 22.663 ns - 18 cycles(tsc) 4.588 ns - improved 80.0%
8 - 88 cycles(tsc) 22.242 ns - 14 cycles(tsc) 3.656 ns - improved 84.1%
16 - 88 cycles(tsc) 22.010 ns - 13 cycles(tsc) 3.480 ns - improved 85.2%
30 - 89 cycles(tsc) 22.305 ns - 13 cycles(tsc) 3.303 ns - improved 85.4%
32 - 89 cycles(tsc) 22.277 ns - 13 cycles(tsc) 3.309 ns - improved 85.4%
34 - 88 cycles(tsc) 22.246 ns - 13 cycles(tsc) 3.294 ns - improved 85.2%
48 - 88 cycles(tsc) 22.121 ns - 13 cycles(tsc) 3.492 ns - improved 85.2%
64 - 88 cycles(tsc) 22.052 ns - 13 cycles(tsc) 3.411 ns - improved 85.2%
128 - 89 cycles(tsc) 22.452 ns - 15 cycles(tsc) 3.841 ns - improved 83.1%
158 - 89 cycles(tsc) 22.403 ns - 14 cycles(tsc) 3.746 ns - improved 84.3%
250 - 91 cycles(tsc) 22.775 ns - 16 cycles(tsc) 4.111 ns - improved 82.4%
Notice it is not recommended to do very large bulk operation with
this bulk API, because local IRQs are disabled in this period.
[1] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/mm/slab_bulk_test01.c
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-15 16:55:16 -07:00
..
2016-03-09 15:43:42 -08:00
2016-02-11 18:35:48 -08:00
2016-01-12 20:47:06 +02:00
2015-12-06 12:46:31 +01:00
2016-01-27 09:09:57 -05:00
2015-07-17 16:39:54 -07:00
2015-11-05 19:34:48 -08:00
2015-08-14 15:56:32 -07:00
2016-01-14 16:00:49 -08:00
2014-12-13 12:42:48 -08:00
2016-01-15 17:56:32 -08:00
2015-11-06 17:50:42 -08:00
2015-11-05 19:34:48 -08:00
2015-06-02 08:33:35 -06:00
2016-03-15 16:55:16 -07:00
2016-03-09 15:43:42 -08:00
2015-11-05 19:34:48 -08:00
2015-06-24 17:49:45 -07:00
2016-02-03 08:57:14 -08:00
2014-08-06 18:01:22 -07:00
2016-02-24 10:46:30 -08:00
2015-11-06 17:50:42 -08:00
2016-03-09 15:43:42 -08:00
2015-09-10 13:29:01 -07:00
2016-02-03 08:28:43 -08:00
2015-02-10 14:30:31 -08:00
2016-02-05 18:10:40 -08:00
2015-01-08 15:10:52 -08:00
2016-03-15 16:55:16 -07:00
2014-06-06 16:08:18 -07:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2016-01-20 17:09:18 -08:00
2015-11-05 19:34:48 -08:00
2016-01-15 17:56:32 -08:00
2015-09-11 16:42:39 -07:00
2016-02-05 18:10:40 -08:00
2016-01-21 17:20:51 -08:00
2016-01-30 09:49:58 +01:00
2016-01-15 17:56:32 -08:00
2016-02-27 10:28:52 -08:00
2016-03-09 15:43:42 -08:00
2016-03-11 16:17:47 -08:00
2015-09-08 15:35:28 -07:00
2016-02-27 10:28:52 -08:00
2016-01-21 17:20:51 -08:00
2016-01-21 17:20:51 -08:00
2015-06-30 19:44:56 -07:00
2016-02-18 16:23:24 -08:00
2014-02-21 08:50:17 +01:00
2015-09-10 13:29:01 -07:00
2016-01-14 16:00:49 -08:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2015-11-05 19:34:48 -08:00
2015-12-06 12:46:31 +01:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-02-05 18:10:40 -08:00
2015-11-05 19:34:48 -08:00
2015-09-10 13:29:01 -07:00
2016-01-15 17:56:32 -08:00
2015-08-13 12:32:00 -06:00
2016-01-15 17:56:32 -08:00
2015-07-17 16:39:54 -07:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2014-09-02 14:46:05 -04:00
2014-09-02 14:46:02 -04:00
2016-01-22 17:02:18 -08:00
2016-02-11 18:35:48 -08:00
2016-01-20 17:09:18 -08:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2016-01-22 18:08:52 -05:00
2016-02-18 16:23:24 -08:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-02-18 16:23:24 -08:00
2016-03-15 16:55:16 -07:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2014-12-10 17:41:09 -08:00
2016-01-20 17:09:18 -08:00
2016-01-15 17:56:32 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 17:02:18 -08:00
2016-01-15 17:56:32 -08:00
2016-02-03 08:28:43 -08:00
2015-11-05 19:34:48 -08:00
2016-01-15 17:56:32 -08:00
2016-02-03 08:28:43 -08:00
2016-02-05 18:10:40 -08:00
2016-02-05 18:10:40 -08:00
2016-01-22 17:02:18 -08:00
2016-01-15 11:40:52 -08:00
2015-11-06 17:50:42 -08:00
2016-01-20 17:09:18 -08:00
2015-12-18 14:25:40 -08:00