[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <91b13c310807252122k6c0f589i901644d3c7ed42d8@mail.gmail.com>
Date: Sat, 26 Jul 2008 12:22:29 +0800
From: "rae l" <crquan@...il.com>
To: "Jens Axboe" <axboe@...nel.dk>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bio: make use of bvec_nr_vecs
On Sat, Jul 26, 2008 at 2:11 AM, Denis ChengRq <crquan@...il.com> wrote:
> bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask);
> - if (bvl) {
> - struct biovec_slab *bp = bvec_slabs + *idx;
> -
> - memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec));
> - }
> + if (bvl)
> + memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec));
and if we have a mempool_zalloc, this can be more simplified,
there was no mempool_zalloc yet, should we create it inlined with
__GFP_ZERO, for this and further use?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists