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

In article <57biop$o9a$1@nova.noris.de>, Matthias Urlichs wrote:
>
>In linux.dev.kernel, article <qm4tii8pyj.fsf@chemie.uni-karlsruhe.de>,
> Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> 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

--
.----------------------------------------------------------------------.
| Mike Jagdis | Internet: mailto:mike@roan.co.uk |
| 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.095 / U:3.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site