Skip to contentSkip to conversation

NFS direct IO needs page lock?

DISCUSSION Olaf Kirch 2 participants 3 messages Feb 15, 2005 – Feb 17, 2005

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

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

Signature · 12 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw

ty den 15.02.2005 Klokka 21:36 (+0100) skreiv Olaf Kirch:

Quoted 11 lines

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

Signature · 12 lines
Trond Myklebust <[email protected]>



-------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
author
#2 lore raw
Quoted 7 lines · Trond Myklebust

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

Signature · 12 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs