Linux NFS development
 help / color / mirror / Atom feed
* NFS direct IO needs page lock?
@ 2005-02-15 20:36 Olaf Kirch
  2005-02-15 22:51 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Kirch @ 2005-02-15 20:36 UTC (permalink / raw)
  To: nfs

Hi,

I'm currently looking at a customer problem problem with weird VM oopses
that is somehow related to a large application doing heavy NFS direct
IO to/from a POSIX shmem area (hm, what application would *that* be :-).

I haven't had a bright idea so far, and I'm not even convinced this is
NFS related at all - but one thing that struck me as odd when meditated
over the code today was that the directio code doesn't lock the pages
in nfs_get_user_pages.  Is that an oversight, or does it do that
intentionally?

Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
okir@suse.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NFS direct IO needs page lock?
  2005-02-15 20:36 NFS direct IO needs page lock? Olaf Kirch
@ 2005-02-15 22:51 ` Trond Myklebust
  2005-02-17 15:34   ` Olaf Kirch
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2005-02-15 22:51 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: nfs

ty den 15.02.2005 Klokka 21:36 (+0100) skreiv Olaf Kirch:
> Hi,
> 
> I'm currently looking at a customer problem problem with weird VM oopses
> that is somehow related to a large application doing heavy NFS direct
> IO to/from a POSIX shmem area (hm, what application would *that* be :-).
> 
> I haven't had a bright idea so far, and I'm not even convinced this is
> NFS related at all - but one thing that struck me as odd when meditated
> over the code today was that the directio code doesn't lock the pages
> in nfs_get_user_pages.  Is that an oversight, or does it do that
> intentionally?

It is intentional. Andrew Morton pointed out that you can play zero-copy
tricks by doing direct-io on an mmapped range of pages (as seems to be
the case above).

That could cause deadlocks if the reader and writer were to both try to
lock the same page.

Cheers,
  Trond

-- 
Trond Myklebust <trond.myklebust@fys.uio.no>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NFS direct IO needs page lock?
  2005-02-15 22:51 ` Trond Myklebust
@ 2005-02-17 15:34   ` Olaf Kirch
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf Kirch @ 2005-02-17 15:34 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: nfs

On Tue, Feb 15, 2005 at 05:51:22PM -0500, Trond Myklebust wrote:
> ty den 15.02.2005 Klokka 21:36 (+0100) skreiv Olaf Kirch:
> It is intentional. Andrew Morton pointed out that you can play zero-copy
> tricks by doing direct-io on an mmapped range of pages (as seems to be
> the case above).
> 
> That could cause deadlocks if the reader and writer were to both try to
> lock the same page.

Thanks, that helps!

Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
okir@suse.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-17 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-15 20:36 NFS direct IO needs page lock? Olaf Kirch
2005-02-15 22:51 ` Trond Myklebust
2005-02-17 15:34   ` Olaf Kirch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox