lkml.org 
[lkml]   [2010]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] cfq: reorder cfq_queue removing padding on 64bit & allowing more objects/slab in it's kmem_cache
On Mon, Feb 15, 2010 at 02:10:36PM +0000, Richard Kennedy wrote:
> This removes 8 bytes of padding from struct cfq_queue on 64 bit builds,
> shrinking it's size to 256 bytes, so fitting into 1 fewer cachelines and
> allowing 1 more object/slab in it's kmem_cache.
>
>
> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
> ----
> patch against 2.6.33-rc8
> tested on x86_64 AMDX2
>
> regards
> Richard
>
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index 023f4e6..db4c127 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -116,10 +116,10 @@ struct cfq_queue {
> unsigned long dispatch_start;
> unsigned int allocated_slice;
> /* time when first request from queue completed and slice started. */
> + unsigned int slice_dispatch;

Can you move it above the comment. The comment describes "slice_start" and
now comment and variable have been separated.

Vivek

> unsigned long slice_start;
> unsigned long slice_end;
> long slice_resid;
> - unsigned int slice_dispatch;
>
> /* pending metadata requests */
> int meta_pending;
> @@ -130,13 +130,13 @@ struct cfq_queue {
> unsigned short ioprio, org_ioprio;
> unsigned short ioprio_class, org_ioprio_class;
>
> + pid_t pid;
> +
> unsigned int seek_samples;
> u64 seek_total;
> sector_t seek_mean;
> sector_t last_request_pos;
>
> - pid_t pid;
> -
> struct cfq_rb_root *service_tree;
> struct cfq_queue *new_cfqq;
> struct cfq_group *cfqg;
>


\
 
 \ /
  Last update: 2010-02-15 15:19    [W:0.055 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site