Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Nick Piggin
On Fri, Feb 08, 2008 at 02:56:09PM -0800, Arjan van de Ven wrote: > Nick Piggin wrote: > >>>Maybe cpus these days have so much store bandwith that doing > >>>things like the above is OK, but I doubt it :-) > >>on modern x86 cpus the memset may even be faster if the memory isn't in > >>cache; >

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Arjan van de Ven
Nick Piggin wrote: Maybe cpus these days have so much store bandwith that doing things like the above is OK, but I doubt it :-) on modern x86 cpus the memset may even be faster if the memory isn't in cache; the "explicit" method ends up doing Write Allocate on the cache lines (so read them

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Nick Piggin
On Fri, Feb 08, 2008 at 07:09:07AM -0800, Arjan van de Ven wrote: > David Miller wrote: > >From: Linus Torvalds <[EMAIL PROTECTED]> > >Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) > > > >>Can we please just stop doing these one-by-one assignments, and just do > >>something like > >> > >>

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Arjan van de Ven
David Miller wrote: From: Linus Torvalds <[EMAIL PROTECTED]> Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) Can we please just stop doing these one-by-one assignments, and just do something like memset(rq, 0, sizeof(*rq)); rq->q = q; rq->ref_count = 1;

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Jens Axboe
On Thu, Feb 07 2008, Linus Torvalds wrote: > > > On Thu, 7 Feb 2008, Ingo Molnar wrote: > > INIT_HLIST_NODE(>hash); > > RB_CLEAR_NODE(>rb_node); > > - rq->ioprio = 0; > > - rq->buffer = NULL; > > - rq->ref_count = 1; > > - rq->q = q; > > - rq->special = NULL; > > -

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Nick Piggin
On Fri, Feb 08, 2008 at 02:56:09PM -0800, Arjan van de Ven wrote: Nick Piggin wrote: Maybe cpus these days have so much store bandwith that doing things like the above is OK, but I doubt it :-) on modern x86 cpus the memset may even be faster if the memory isn't in cache; the explicit

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Jens Axboe
On Thu, Feb 07 2008, Linus Torvalds wrote: On Thu, 7 Feb 2008, Ingo Molnar wrote: INIT_HLIST_NODE(rq-hash); RB_CLEAR_NODE(rq-rb_node); - rq-ioprio = 0; - rq-buffer = NULL; - rq-ref_count = 1; - rq-q = q; - rq-special = NULL; - rq-data_len = 0; - rq-data

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Arjan van de Ven
David Miller wrote: From: Linus Torvalds [EMAIL PROTECTED] Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) Can we please just stop doing these one-by-one assignments, and just do something like memset(rq, 0, sizeof(*rq)); rq-q = q; rq-ref_count = 1;

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Nick Piggin
On Fri, Feb 08, 2008 at 07:09:07AM -0800, Arjan van de Ven wrote: David Miller wrote: From: Linus Torvalds [EMAIL PROTECTED] Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) Can we please just stop doing these one-by-one assignments, and just do something like memset(rq, 0, sizeof(*rq));

Re: [patch] block layer: kmemcheck fixes

2008-02-08 Thread Arjan van de Ven
Nick Piggin wrote: Maybe cpus these days have so much store bandwith that doing things like the above is OK, but I doubt it :-) on modern x86 cpus the memset may even be faster if the memory isn't in cache; the explicit method ends up doing Write Allocate on the cache lines (so read them from

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Linus Torvalds
On Thu, 7 Feb 2008, David Miller wrote: > > Maybe cpus these days have so much store bandwith that doing > things like the above is OK, but I doubt it :-) I seriously doubt the same is true for the IO requests (which are different anyway, and tend to happen at a much lower frequency than

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread David Miller
From: Linus Torvalds <[EMAIL PROTECTED]> Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) > Can we please just stop doing these one-by-one assignments, and just do > something like > > memset(rq, 0, sizeof(*rq)); > rq->q = q; > rq->ref_count = 1; > INIT_HLIST_NODE(>hash); >

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Jens Axboe
On Thu, Feb 07 2008, Ingo Molnar wrote: > > * Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > On Thu, 7 Feb 2008, Ingo Molnar wrote: > > > INIT_HLIST_NODE(>hash); > > > RB_CLEAR_NODE(>rb_node); > > > - rq->ioprio = 0; > > > - rq->buffer = NULL; > > > - rq->ref_count = 1; > > > - rq->q = q; >

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Ingo Molnar
* Linus Torvalds <[EMAIL PROTECTED]> wrote: > On Thu, 7 Feb 2008, Ingo Molnar wrote: > > INIT_HLIST_NODE(>hash); > > RB_CLEAR_NODE(>rb_node); > > - rq->ioprio = 0; > > - rq->buffer = NULL; > > - rq->ref_count = 1; > > - rq->q = q; > > - rq->special = NULL; > > - rq->data_len

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Jens Axboe
On Thu, Feb 07 2008, Linus Torvalds wrote: > > > On Thu, 7 Feb 2008, Ingo Molnar wrote: > > INIT_HLIST_NODE(>hash); > > RB_CLEAR_NODE(>rb_node); > > - rq->ioprio = 0; > > - rq->buffer = NULL; > > - rq->ref_count = 1; > > - rq->q = q; > > - rq->special = NULL; > > -

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Linus Torvalds
On Thu, 7 Feb 2008, Ingo Molnar wrote: > INIT_HLIST_NODE(>hash); > RB_CLEAR_NODE(>rb_node); > - rq->ioprio = 0; > - rq->buffer = NULL; > - rq->ref_count = 1; > - rq->q = q; > - rq->special = NULL; > - rq->data_len = 0; > - rq->data = NULL; > -

[patch] block layer: kmemcheck fixes

2008-02-07 Thread Ingo Molnar
* Jens Axboe <[EMAIL PROTECTED]> wrote: > [...] but may not post anything until after my vacation. oh, you going on a vacation. I am sitting on a few block layer patches you might be interested in :-) i am playing with Vegard Nossum's kmemcheck on x86 (with much help from Pekka Enberg for

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Jens Axboe
On Thu, Feb 07 2008, Linus Torvalds wrote: On Thu, 7 Feb 2008, Ingo Molnar wrote: INIT_HLIST_NODE(rq-hash); RB_CLEAR_NODE(rq-rb_node); - rq-ioprio = 0; - rq-buffer = NULL; - rq-ref_count = 1; - rq-q = q; - rq-special = NULL; - rq-data_len = 0; - rq-data

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Jens Axboe
On Thu, Feb 07 2008, Ingo Molnar wrote: * Linus Torvalds [EMAIL PROTECTED] wrote: On Thu, 7 Feb 2008, Ingo Molnar wrote: INIT_HLIST_NODE(rq-hash); RB_CLEAR_NODE(rq-rb_node); - rq-ioprio = 0; - rq-buffer = NULL; - rq-ref_count = 1; - rq-q = q; - rq-special = NULL;

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Ingo Molnar
* Linus Torvalds [EMAIL PROTECTED] wrote: On Thu, 7 Feb 2008, Ingo Molnar wrote: INIT_HLIST_NODE(rq-hash); RB_CLEAR_NODE(rq-rb_node); - rq-ioprio = 0; - rq-buffer = NULL; - rq-ref_count = 1; - rq-q = q; - rq-special = NULL; - rq-data_len = 0; - rq-data =

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread David Miller
From: Linus Torvalds [EMAIL PROTECTED] Date: Thu, 7 Feb 2008 09:42:56 -0800 (PST) Can we please just stop doing these one-by-one assignments, and just do something like memset(rq, 0, sizeof(*rq)); rq-q = q; rq-ref_count = 1; INIT_HLIST_NODE(rq-hash);

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Linus Torvalds
On Thu, 7 Feb 2008, David Miller wrote: Maybe cpus these days have so much store bandwith that doing things like the above is OK, but I doubt it :-) I seriously doubt the same is true for the IO requests (which are different anyway, and tend to happen at a much lower frequency than