From: Andrew Morton <akpm@digeo.com>
To: John Navil Joseph <cs99185@nitc.ac.in>
Cc: linux-mm@kvack.org
Subject: Re: Doubt in pagefault handler..!
Date: Wed, 5 Feb 2003 00:48:23 -0800 [thread overview]
Message-ID: <20030205004823.30acdfe0.akpm@digeo.com> (raw)
In-Reply-To: <20030204174944.GA836@192.168.3.73>
John Navil Joseph <cs99185@nitc.ac.in> wrote:
>
> 1) add the current process to a wait queue
> 2) invoke schedule() from the page fault handler
> 3) wake up the process after the transfer has been completed.
You probably don't need to do all that by hand - you should be calling
non-blocking functions in the network layer, and waking the faulting process
up on completion of network I/O (based on interrupt-time networking
callbacks).
Looking at the NFS and SMB client code may help.
> i tried to trace pagefault handler all the way down to where the acutal IO
> takes palce incase of the transfer of page from swap to memory..But i never
> saw schedule() anywhere. But i know that process sleeps on page I/O .. then
> how and where does this sleeping takes place.?
The faulting process will sleep in wait_on_page() or lock_page(). See
filemap_nopage(), around the page_not_uptodate label.
The filesystem's responsibility is to run unlock_page() against the page once
its contents have been filled in from the backing medium (disk, network,
etc). it will typically do this from interrupt context. The unlock_page()
will wake up the faulting process.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
prev parent reply other threads:[~2003-02-05 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-04 17:49 John Navil Joseph
2003-02-05 8:48 ` Andrew Morton [this message]
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=20030205004823.30acdfe0.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=cs99185@nitc.ac.in \
--cc=linux-mm@kvack.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