[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100315181020.GD3857@gandalf>
Date: Mon, 15 Mar 2010 20:10:21 +0200
From: Felipe Balbi <me@...ipebalbi.com>
To: Michal Nazarewicz <m.nazarewicz@...sung.com>
Cc: linux-usb@...r.kernel.org,
David Brownell <dbrownell@...rs.sourceforge.net>,
gregkh@...e.de, linux-kernel@...r.kernel.org,
Marek Szyprowski <m.szyprowski@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>
Subject: Re: [PATCH] USB: f_mass_storage: dynamic buffers for better
alignment
On Mon, Mar 15, 2010 at 11:09:55AM +0100, Michal Nazarewicz wrote:
> "Static" buffers in fsg_buffhd structure (ie. fields which are arrays
> rather then pointers to dynamically allocated memory) are not aligned
> to any "big" power of two which may lead to poor DMA performance
not so true as you can add __attribute__ ((aligned(32))) to those.
> @@ -2747,13 +2746,18 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
>
>
> /* Data buffers cyclic list */
> - /* Buffers in buffhds are static -- no need for additional
> - * allocation. */
> bh = common->buffhds;
> - i = FSG_NUM_BUFFERS - 1;
> - do {
> + i = FSG_NUM_BUFFERS;
> + for (i = FSG_NUM_BUFFERS;; ++bh) {
something like
for (i = 0; i < FSG_NUM_BUFFERS; i++, ++bh) {
wouldn't it do it ??
--
balbi
--
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