Messages in this thread |  | | From | (Mike Jagdis) | Subject | Re: Accessing copy_to_user() from interrupt handler? | Date | Tue, 26 Nov 1996 13:59:20 GMT |
| |
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 | `----------------------------------------------------------------------'
|  |