All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Zach Brown <zach.brown@oracle.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [patch] remove redundant iov segment check
Date: Tue, 2 Jan 2007 11:01:36 +0000	[thread overview]
Message-ID: <20070102110136.GA20640@infradead.org> (raw)
In-Reply-To: <28F99581-3A2A-45BD-8F00-B554313E2C26@oracle.com>

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

  parent reply	other threads:[~2007-01-02 11:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 16:26 [patch] remove redundant iov segment check Chen, Kenneth W
2006-12-04 19:18 ` Zach Brown
2006-12-04 19:45   ` Chen, Kenneth W
2006-12-04 19:50     ` Zach Brown
2007-01-02 11:01   ` Christoph Hellwig [this message]
2007-01-02 18:22     ` Zach Brown
2007-01-02 18:25       ` Chen, Kenneth W
2006-12-04 19:36 ` Andrew Morton
2006-12-04 19:50   ` Chen, Kenneth W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070102110136.GA20640@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach.brown@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.