[lkml]   [1996]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Accessing copy_to_user() from interrupt handler?

In article <57biop$o9a$>, Matthias Urlichs wrote:
>In, article <>,
> Klaus-Georg Adams <> writes:
>> This brings us back to the problem of kmalloc()ing ca. 1MB reliably. I
>> prefer allocating the buffer in the ccd_open() rather than in
>> module_init(). And so far there is no way to tell kmalloc() to page
>> out a couple of user pages if memory is running low instead of
>> failing. vmalloc() works, but then you don't want page faults when
>> reading from the CCD.
>It seems that vmalloc needs an option to actually allocate the pages it
>maps (I was assuming it does that already?).

It does. Also kmalloc does page in order to acquire memory I think.
But it doesn't page if you use GFP_ATOMIC and you *must* use GFP_ATOMIC
from an interrupt because an interrupt handler can't block.

Incidentally the SCSI code uses GFP_ATOMIC all over the damn place
- even from things like init_module. There's a job for someone... :-)


| Mike Jagdis | Internet: |
| Roan Technology Ltd. | |
| 54A Peach Street, Wokingham | Telephone: +44 118 989 0403 |
| RG40 1XG, ENGLAND | Fax: +44 118 989 1195 |

 \ /
  Last update: 2005-03-22 13:37    [W:0.067 / U:2.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site