Skip to contentSkip to conversation

io: remove padding from io_context on 64bit builds

PATCH In review Richard Kennedy 2 participants 2 messages Feb 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io: remove padding from io_context on 64bit builds

On 64 bit builds when CONFIG_BLK_CGROUP=n (the default) this removes 8 bytes of padding from structure io_context and drops its size from 72 to 64 bytes, so needing one fewer cachelines and allowing more objects per slab in it's kmem_cache.

----
patch against 2.6.33
compiled & test on x86_64 AMDX2
regards
Richard

include/linux/iocontext.h +1 -1
index 78ef023..1195a80 100644
@@ -49,8 +49,8 @@ struct io_context {
 	/*
 	 * For request batching
 	 */
-	unsigned long last_waited; /* Time last woken after wait for request */
 	int nr_batch_requests;     /* Number of requests left in the batch */
+	unsigned long last_waited; /* Time last woken after wait for request */
 
 	struct radix_tree_root radix_root;
 	struct hlist_head cic_list;
#1 lore raw
Quoted 6 lines · Richard Kennedy

On 64 bit builds when CONFIG_BLK_CGROUP=n (the default) this removes 8 bytes of padding from structure io_context and drops its size from 72 to 64 bytes, so needing one fewer cachelines and allowing more objects per slab in it's kmem_cache.

Thanks Richard, applied.

Signature · 1 line
Jens Axboe