On 10/12/06, Parav Pandit <paravpandit@xxxxxxxxx> wrote:
Hi, I need to allocate some 256 bytes of memory in the interrupt handler each time when I get the interrupt. Size varies from 8 bytes to 256 bytes. There are various options such as (a) kmalloc(GFP_ATOMIC),
GFP_ATOMIC .... may sleep. try other flags available to kmalloc in interrupt context. please CMIIW. Good luck pradeep
(b) kmem_cache_alloc (c) mempool_alloc My driver need to support, at max 4096 * 256 = 1MByte buffer. I don't need DMA support. How can I use above APIs so that I always get the memory in the interrupt handler? I don't want to implement my own memory manager where I pre-allocate 1Mbytes + few pointers to always avail memory in the interrupt handler. What mechanism is used in the sk_buff allocation from the interrupt handler? Is there any background kernel thread which takes care to always provide memory in the interrupt handler for above 3 APIs and for sk_buff? Regards, Parav Pandit ________________________________ Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-- play the game -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/