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; > >>t

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-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(r

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; INIT_HLIST_N

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-

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 high

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 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

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->da

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-

Re: [patch] block layer: kmemcheck fixes

2008-02-07 Thread Linus Torvalds
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 = NULL; > - r