linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wendy Cheng <wcheng@redhat.com>
To: suparna@in.ibm.com
Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][WIP] DIO simplification and AIO-DIO stability
Date: Fri, 24 Feb 2006 10:51:19 -0500	[thread overview]
Message-ID: <43FF2B77.5000804@redhat.com> (raw)
In-Reply-To: <20060224115314.GA23318@in.ibm.com>

Suparna Bhattacharya wrote:

>>A new DIO flag is added into our distribution (2.6.9 based) to work 
>>around the problem by moving the inode semaphore acquiring within 
>>__blockdev_direct_IO() (patch attached) into GFS code path (so lock 
>>order can be re-arranged). The new lock granularity is not ideal but it 
>>gets us out of this deadlock.
>>    
>>
>
>Could you help me understand in a little more detail why DIO_OWN_LOCKING
>does not work for you ? Is the releasing of i_sem during READ a problem ?
>Doesn't holding i_sem for the entire duration of IO for read slow down
>concurrent DIO reads to different parts of the file ?
>  
>

We don't mess around with i_sem during read. So that piece of locking 
code is ok (but I have to say it looks very messy). The thing we can't 
work around is #518 in get_more_blocks() (from 2.6.9 base code so line 
offset may be different but you can get the idea):

    491 static int get_more_blocks(struct dio *dio)
    492 {
    493         int ret;
    ......
    516
    517                 create = dio->rw == WRITE;
    518                 if ((dio->lock_type == DIO_LOCKING) || 
(dio->lock_type =        = DIO_CLUSTER_LOCKING)) {
    519                         if (dio->block_in_file < 
(i_size_read(dio->inode        ) >>
    520                                                         
dio->blkbits))
    521                                 create = 0;
    522                 } else if (dio->lock_type == DIO_NO_LOCKING) {
    523                         create = 0;
    524                 }

>One of the things I wanted to achieve in the proposal was to avoid
>the need for these various locking mode flag checks in the DIO code,
>leaving it to the higher level to just select the right entry points,
>i.e. the _nolock or lock versions of generic_file_aio_write et al.
>  
>
That's a good news - these DIO locking flags are all last-minute 
bandaids anyway.

>Would appreciate your thoughts on this, once you've had a chance to
>go throught it.
>
>  
>
On the road all next week but will get to it when I'm back to office. On 
the other hand, thank you for looking into this.

-- Wendy

  reply	other threads:[~2006-02-24 15:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23  7:29 [RFC][WIP] DIO simplification and AIO-DIO stability Suparna Bhattacharya
2006-02-23 19:12 ` Wendy Cheng
2006-02-24 11:53   ` Suparna Bhattacharya
2006-02-24 15:51     ` Wendy Cheng [this message]
2006-02-24  0:39 ` Badari Pulavarty
2006-02-24  1:13   ` Andrew Morton
2006-02-24 11:25     ` Suparna Bhattacharya
2006-02-24  1:01 ` Chris Mason
2006-02-24  9:37   ` Suparna Bhattacharya
2006-02-24  1:21 ` Zach Brown
2006-02-24 11:12   ` Suparna Bhattacharya
2006-02-24 18:09     ` Badari Pulavarty

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=43FF2B77.5000804@redhat.com \
    --to=wcheng@redhat.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suparna@in.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).