public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Linus Torvalds <torvalds@osdl.org>,
	David Teigland <teigland@redhat.com>,
	Patrick Caulfield <pcaulfie@redhat.com>,
	Kevin Anderson <kanderso@redhat.com>,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: GFS2 and DLM
Date: Tue, 20 Jun 2006 16:40:52 +0100	[thread overview]
Message-ID: <1150818052.3856.1399.camel@quoit.chygwyn.com> (raw)
In-Reply-To: <44980064.6040306@yahoo.com.au>

Hi,

On Wed, 2006-06-21 at 00:04 +1000, Nick Piggin wrote:
> Thanks.
> 
> Steven Whitehouse wrote:
> >  kernel/printk.c                    |    1 
> >  mm/filemap.c                       |    1 
> >  mm/readahead.c                     |    1 
> 
> These EXPORTs are a bit unfortunate.
> 
> BTW. you have one function that calls file_ra_state_init but never appears
> to use the initialized ra_state.
Thanks for pointing that one out, see:
http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=0d42e54220ba34e031167138ef91cbd42d8b5876
for the patch to fix that.

> 
> Why is gfs2_internal_read() called the "external read function" in the
> changelog?
> 
Thats a typo/thinko I think. The title of the entry is still correct
though and should give a bit of a clue to that being wrong in the log.

> The internal_read function doesn't look like a great candidate for passing
> a ra_state to, which invokes all the mechanism expecting a regular file
> being accessed by a user program.
> 
> It seems as though you could explicitly control readahead more optimally,
> but I don't know what the best way to do that would be. I assume Andrew
> has had a quick look and doesn't know either.
> 
I'm not sure if he has looked at this specifically, I've not had any
other feedback suggesting that its a bad idea so far. It is used in
places where a regular file is being read, so it would appear to be the
"right thing" in those cases. At least it seems preferable to me than
the alternative of writing a special case readahead which I doubt would
be a great difference in performance.

> The part where you needed file_read_actor looks like pretty much a stright
> cut and paste from __generic_file_aio_read, which indicates that you might
> be exporting at the wrong level.
> 
Yes, and as the comment says:

/**
 * __gfs2_file_aio_read - The main GFS2 read function
 *
 * N.B. This is almost, but not quite the same as __generic_file_aio_read()
 * the important subtle different being that inode->i_size isn't valid
 * unless we are holding a lock, and we do this _only_ on the O_DIRECT
 * path since otherwise locking is done entirely at the page cache
 * layer.
 */

We have to know the i_size since we fall back to buffered I/O in case
the read is outside the current size of the inode, exactly as other
filesystems do. We only do this on the read path though since the write
path for direct I/O works slightly differently and is not a problem in
that case.

I'm certainly interested in any possible solutions to this, but at the
moment, I can't see any easy way around it. Suggestions are very welcome
of course.

> Not sure about the tty_ export. Would it be better to make a generic
> printfish interface on top of it and also replace the interesting dquot.c
> gymnastics? (I don't know)
> 
Possibly. Originally this code had its own copy of tty_write_message()
and it seemed a bit silly to duplicate this. I'm not sure though that we
really need a more generic interface - its only used for a single
function at the moment, and its crude but effective,

Steve.



  reply	other threads:[~2006-06-20 15:33 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 12:17 GFS2 and DLM Steven Whitehouse
2006-06-20 12:32 ` Nick Piggin
2006-06-20 12:47   ` Steven Whitehouse
2006-06-20 14:04     ` Nick Piggin
2006-06-20 15:40       ` Steven Whitehouse [this message]
2006-06-20 19:55         ` Andrew Morton
2006-06-21 11:20       ` Steven Whitehouse
2006-06-23 14:45       ` Christoph Hellwig
2006-06-26 21:03         ` Ingo Molnar
2006-06-27  7:52           ` Christoph Hellwig
2006-06-20 12:33 ` Christoph Hellwig
2006-06-20 12:55   ` Steven Whitehouse
2006-06-20 15:55   ` Ingo Molnar
2006-06-23 14:49 ` Christoph Hellwig
2006-06-23 20:46   ` Andrew Morton
2006-06-26 20:03   ` Ingo Molnar
2006-06-26 20:12     ` Arjan van de Ven
2006-06-27  7:08       ` Ingo Molnar
2006-06-27  6:33     ` Ingo Molnar
2006-06-27  6:43       ` Arjan van de Ven
2006-06-27  7:07         ` Ingo Molnar
2006-06-27  7:06       ` Andrew Morton
2006-06-27  8:35         ` Ingo Molnar
2006-06-27  8:50           ` Andrew Morton
2006-06-27  9:04             ` Ingo Molnar
2006-06-27  9:23               ` Andrew Morton
2006-07-03 13:40           ` Steven Whitehouse
2006-06-27  8:16       ` Nathan Scott
2006-06-27  8:22         ` Ingo Molnar
2006-06-27  8:41           ` Pekka Enberg
2006-06-27 10:33             ` Ingo Molnar
2006-06-27  8:42           ` Nathan Scott
2006-06-27  8:51             ` Ingo Molnar
2006-06-23 14:54 ` Christoph Hellwig
2006-06-23 15:54   ` Steven Whitehouse
2006-06-23 15:54     ` Christoph Hellwig
2006-06-23 16:09       ` Steven Whitehouse
2006-06-23 14:55 ` Christoph Hellwig
2006-06-23 14:57 ` Christoph Hellwig
2006-06-23 15:26   ` Steven Whitehouse
2006-06-23 15:00 ` Christoph Hellwig
2006-06-23 16:29   ` Steven Whitehouse
2006-06-23 16:48     ` Christoph Hellwig
2006-06-26 20:58       ` Ingo Molnar
2006-06-27  7:50         ` Christoph Hellwig
2006-06-27  8:31           ` Ingo Molnar

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=1150818052.3856.1399.camel@quoit.chygwyn.com \
    --to=swhiteho@redhat.com \
    --cc=akpm@osdl.org \
    --cc=kanderso@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pcaulfie@redhat.com \
    --cc=teigland@redhat.com \
    --cc=torvalds@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox