Re: [PATCH 3/3] nfnetlink_queue: use hash table to speed up entry finding.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 15, 2010 at 6:36 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
> Changli Gao wrote:
>> On Tue, Apr 13, 2010 at 9:25 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
>>>> Yes, that is why vmalloc() is perfect for this case. No extra memory for
>>>> management, but one pointer for each page of memory.
>>> I agree, if it works for conntrack, it certainly also works for
>>> nfnetlink_queue.
>>>
>>
>> I need to allocate memory in atomic section, so vmalloc() can't be used. :(
>
> Why?
>

instance_create() is called in rcu read-side critical section, and the
whole body of this function is protected by the spinlock
instances_lock. All these make memory allocation for queue instances
should be atomic.

-- 
Regards,
Changli Gao(xiaosuo@xxxxxxxxx)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux