Eric Dumazet
720eba31f4
modules: Use a better scheme for refcounting
...
Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is
using a lot of memory.
Each 'struct module' contains an [NR_CPUS] array of full cache lines.
This patch uses existing infrastructure (percpu_modalloc() &
percpu_modfree()) to allocate percpu space for the refcount storage.
Instead of wasting NR_CPUS*128 bytes (on i386), we now use
nr_cpu_ids*sizeof(local_t) bytes.
On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce
size of module files by about 2 Mbytes. (1Kb per module)
Instead of having all refcounters in the same memory node - with TLB misses
because of vmalloc() - this new implementation permits to have better
NUMA properties, since each CPU will use storage on its preferred node,
thanks to percpu storage.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com >
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2009-02-02 19:17:55 -08:00
..
2009-01-06 18:10:26 -08:00
2009-01-30 19:50:25 +05:30
2009-01-30 19:59:53 +05:30
2009-01-06 17:14:01 -08:00
2009-01-11 01:34:25 +01:00
2009-01-09 12:37:15 -08:00
2009-01-30 20:00:47 +05:30
2009-01-30 23:30:42 +05:30
2009-01-30 23:32:45 +05:30
2009-01-08 20:10:38 +00:00
2009-01-30 23:33:12 +05:30
2009-01-30 23:34:34 +05:30
2009-01-30 23:36:36 +05:30
2009-01-30 23:37:37 +05:30
2009-01-07 10:00:22 -08:00
2009-01-09 03:41:08 -05:00
2009-01-15 16:39:41 -08:00
2009-01-30 23:38:03 +05:30
2009-01-07 08:45:46 -08:00
2009-01-30 23:38:37 +05:30
2009-01-15 16:39:41 -08:00
2009-01-30 23:39:08 +05:30
2009-01-09 11:52:14 -08:00
2009-01-06 15:59:23 -08:00
2009-01-30 23:39:42 +05:30
2009-01-08 08:31:12 -08:00
2009-01-08 15:37:43 +00:00
2009-01-30 23:40:06 +05:30
2009-01-06 15:59:29 -08:00
2009-01-30 12:34:37 +01:00
2009-01-30 12:34:38 +01:00
2009-01-30 23:40:35 +05:30
2009-01-09 16:54:42 -08:00
2009-01-30 23:41:27 +05:30
2009-01-15 16:39:41 -08:00
2009-01-30 23:44:08 +05:30
2009-01-29 18:04:45 -08:00
2009-01-30 23:44:41 +05:30
2009-01-30 22:35:29 +01:00
2009-01-14 14:15:14 +01:00
2009-01-09 16:54:41 -08:00
2009-01-15 16:39:41 -08:00
2009-01-08 08:31:11 -08:00
2009-01-15 16:39:41 -08:00
2009-01-26 19:21:26 -08:00
2009-01-09 15:06:12 -08:00
2009-01-12 20:56:41 +01:00
2009-01-30 23:45:32 +05:30
2009-01-26 10:13:08 -08:00
2009-01-28 07:50:14 -08:00
2009-01-30 23:46:03 +05:30
2009-01-30 23:46:40 +05:30
2009-01-30 23:47:07 +05:30
2009-01-30 23:47:59 +05:30
2009-01-30 23:48:33 +05:30
2009-01-30 23:49:07 +05:30
2009-01-08 08:31:00 -08:00
2009-01-08 08:31:00 -08:00
2009-01-08 17:14:59 -08:00
2009-01-08 17:14:59 -08:00
2009-01-15 16:39:41 -08:00
2009-01-09 16:54:42 -08:00
2009-01-30 23:49:39 +05:30
2009-01-30 23:50:12 +05:30
2009-01-30 23:50:37 +05:30
2009-01-30 23:51:17 +05:30
2009-01-26 21:19:52 +01:00
2009-01-26 21:19:57 +01:00
2009-01-30 23:51:41 +05:30
2009-01-14 19:19:04 +01:00
2009-01-30 23:52:16 +05:30
2009-01-30 23:52:41 +05:30
2009-01-30 23:53:12 +05:30
2009-01-26 12:30:12 -08:00
2009-01-30 23:53:40 +05:30
2009-01-30 23:54:53 +05:30
2009-01-30 23:55:45 +05:30
2009-01-15 16:39:41 -08:00
2009-01-15 16:39:41 -08:00
2009-01-30 23:56:13 +05:30
2009-01-30 23:56:48 +05:30
2009-01-30 23:57:16 +05:30
2009-01-30 23:57:43 +05:30
2009-01-07 18:52:44 +01:00
2009-01-15 16:39:41 -08:00
2009-01-06 17:10:53 -08:00
2009-01-15 16:39:38 -08:00
2009-01-30 23:58:12 +05:30
2009-01-30 23:59:12 +05:30
2009-01-30 23:58:41 +05:30
2009-01-30 23:59:44 +05:30
2009-01-31 00:00:06 +05:30
2009-01-16 11:57:00 -05:00
2009-01-15 16:39:37 -08:00
2009-01-15 16:39:41 -08:00
2009-01-30 12:34:37 +01:00
2009-01-08 08:31:15 -08:00
2009-01-20 20:52:10 -08:00
2009-01-29 18:04:43 -08:00
2009-01-15 16:39:41 -08:00
2009-01-08 12:38:58 +00:00
2009-01-08 17:55:03 +00:00
2009-01-27 02:15:49 -05:00
2009-01-15 16:39:41 -08:00
2009-01-15 16:39:38 -08:00
2009-01-15 16:39:41 -08:00
2009-01-08 08:31:10 -08:00
2009-01-09 16:54:41 -08:00
2009-01-31 00:00:35 +05:30
2009-01-09 22:44:25 +01:00
2009-01-11 17:55:16 +01:00
2009-01-08 08:31:07 -08:00
2009-01-08 12:04:47 +00:00
2009-01-14 07:32:44 -08:00
2009-01-08 08:31:07 -08:00
2009-01-27 16:06:21 -08:00
2009-02-02 19:17:55 -08:00
2009-01-31 00:01:11 +05:30
2009-01-31 00:01:42 +05:30
2009-01-14 21:05:05 -08:00
2009-01-07 17:38:31 -05:00
2009-01-31 00:02:27 +05:30
2009-01-31 00:15:24 +05:30
2009-01-08 16:25:18 +11:00
2009-01-09 15:49:06 -07:00
2009-01-07 22:48:15 +01:00
2009-01-07 09:59:50 -08:00
2009-01-08 08:31:05 -08:00
2009-01-09 03:39:43 -05:00
2009-01-26 06:51:26 -05:00
2009-01-07 11:13:22 -08:00
2009-01-07 11:13:11 -08:00
2009-01-16 12:57:58 -08:00
2009-01-06 17:10:04 -08:00
2009-01-15 16:39:41 -08:00
2009-01-31 00:02:54 +05:30
2009-01-08 08:31:12 -08:00
2009-01-08 08:31:12 -08:00
2009-01-31 00:03:40 +05:30
2009-01-31 00:04:50 +05:30
2009-01-31 00:05:30 +05:30
2009-01-07 21:44:20 +01:00
2009-01-07 21:44:20 +01:00
2009-01-16 18:02:10 +01:00
2009-01-15 16:39:41 -08:00
2009-01-31 00:05:59 +05:30
2009-01-10 06:04:33 -08:00
2009-01-15 16:39:37 -08:00
2009-01-06 15:59:28 -08:00
2009-01-31 00:15:57 +05:30
2009-01-29 18:04:45 -08:00
2009-01-08 16:25:18 +11:00
2009-01-31 00:06:33 +05:30
2009-01-11 03:41:58 +01:00
2009-01-31 00:07:00 +05:30
2009-01-27 02:15:45 -05:00
2009-01-14 19:56:50 -08:00
2009-01-08 08:31:10 -08:00
2009-01-31 00:07:31 +05:30
2009-01-29 18:04:44 -08:00
2009-01-31 00:08:18 +05:30
2009-01-07 11:27:12 -08:00
2009-01-07 10:00:11 -08:00
2009-01-27 16:15:36 -08:00
2009-01-31 00:09:13 +05:30
2009-01-31 00:10:11 +05:30
2009-01-31 00:10:59 +05:30
2009-01-31 00:11:25 +05:30
2009-01-31 00:12:44 +05:30
2009-01-31 00:13:08 +05:30
2009-01-07 10:00:16 -08:00
2009-01-26 09:47:56 -08:00