linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kanoj Sarcar <kanoj@google.engr.sgi.com>
To: Shuvabrata Ganguly <sganguly@cse.iitkgp.ernet.in>
Cc: linux MM <linux-mm@kvack.org>
Subject: Re: Question about pte_alloc()
Date: Tue, 14 Nov 2000 12:51:12 -0800 (PST)	[thread overview]
Message-ID: <200011142051.MAA81386@google.engr.sgi.com> (raw)
In-Reply-To: <3A12363A.3B5395AF@cse.iitkgp.ernet.in> from "Shuvabrata Ganguly" at Nov 15, 2000 02:07:38 AM

> 
> hi all,
> 
> it appears from the code that pte_alloc() might block since it allocates
> a page table with GFP_KERNEL if the page table doesnt already exist. i
> need to call pte_alloc() at interrupt time. Basically i want to map some
> kernel memory into user space as soon as the device gives me data. will
> there be any problem if i use another version of pte_alloc() which calls
> with GFP_ATOMIC priority?
> Maybe i am completely lost :-)

Why do you want to run the risk of failing in your allocation at intr
time? 

A cleaner thing to do is to allocate vma/memory/pagetables at driver 
mmap/fcntl time. If you must make the user program fault before your
device will give data (although this synchronization is probably better
done other ways), mark the ptes invalid ... then mark them valid when 
you get the data in your intr routine ... of course, you *might* want 
to flush tlbs on other processors too in that case.

Kanoj

> 
> cheers
> joy
> 
> --
> 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.eu.org/Linux-MM/
> 

--
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.eu.org/Linux-MM/

  reply	other threads:[~2000-11-14 20:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-15  7:07 Shuvabrata Ganguly
2000-11-14 20:51 ` Kanoj Sarcar [this message]
2000-11-15 10:56 ` Stephen C. Tweedie
2000-11-16  0:04   ` Shuvabrata Ganguly
2000-11-15 15:47     ` Stephen C. Tweedie
2000-11-16 20:32       ` Shuvabrata Ganguly
2000-11-16 14:37         ` Ingo Oeser
2000-11-15 15:20 Mark_H_Johnson
2000-11-15 15:34 ` Stephen C. Tweedie

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=200011142051.MAA81386@google.engr.sgi.com \
    --to=kanoj@google.engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=sganguly@cse.iitkgp.ernet.in \
    /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