netdev
[Top] [All Lists]

Re: [HELP] Packet scheduler

To: dhanak@xxxxxxxxxx (Hanak David)
Subject: Re: [HELP] Packet scheduler
From: kuznet@xxxxxxxxxxxxx
Date: Thu, 9 Dec 1999 17:45:32 +0300 (MSK)
Cc: netdev@xxxxxxxxxxxxxxxxxxxxxxx
In-reply-to: <dueaenkfl55.fsf@xxxxxxxxxxxxxxxxxxx> from "Hanak David" at Dec 9, 99 11:45:10 am
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> the hang of it and it works fine.  Only I get warnings saying:
> 
>    kmem_grow: Called nonatomically from int - size-64

It is not a warning, it is fatal error.


> My question is: what should I add to avoid this?  

Do not use non-atomic operations in atomic context.


> Is a pair of start_bh_atomic() end_bh_atomic() calls missing?

enqueue/dequeue are already BH protected.


>  What should be
> protected with these functions at all?  (And what needn't?)

They are already serialized, so that enqueue/dequeue need not
any additional protection.

> If you need a part of code, I gladly send it...  

Please. Though, check first the module for GFP_KERNEL and for
balanced start_bh_atomic and end_bh_atomic.

Alexey

<Prev in Thread] Current Thread [Next in Thread>