[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070102110136.GA20640@infradead.org>
Date: Tue, 2 Jan 2007 11:01:36 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Zach Brown <zach.brown@...cle.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@...el.com>,
Andrew Morton <akpm@...l.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [patch] remove redundant iov segment check
> I wonder if it wouldn't be better to make this change as part of a
> larger change that moves towards an explicit iovec container struct
> rather than bare 'struct iov *' and 'nr_segs' arguments. The struct
> could have a flag that expressed whether the elements had been
> checked. A helper could be called by the upper and lower code paths
> which does the checking, marks the flag, and avoids checking again if
> the flag is set.
>
> We've wanted an explicit struct in the past to avoid the multiple
> walks of iovecs that various paths do for their own reasons. The
> iovec walk that is checking for length wrapping could also be
> building a bitmap of length alignment that O_DIRECT could be using to
> test 512B alignment without having to walk the iovec again.
I suspect it should be rather trivial to get this started. As a first
step we simply add a
struct iodesc {
int nr_segs;
struct iovec ioc[]
};
And then we can add fields where nessecary. First a full_length one
to avoid the loops to calculate thw whole I/O size, then flags for
the alignment check, etc..
-
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