netdev
[Top] [All Lists]

Re: [Linux-ATM-General] [PATCH] ATM - remove unnecessary GFP_ATOMIC allo

To: davem@xxxxxxxxxx, John Levon <levon@xxxxxxxxxxxxxxxxx>
Subject: Re: [Linux-ATM-General] [PATCH] ATM - remove unnecessary GFP_ATOMIC allocation
From: chas williams <chas@xxxxxxxxxxxxxxxx>
Date: Fri, 05 Sep 2003 08:52:22 -0400
Cc: linux-atm-general@xxxxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: Your message of "Fri, 05 Sep 2003 12:53:08 BST." <20030905115308.GA96209@compsoc.man.ac.uk>
Reply-to: chas3@xxxxxxxxxxxxxxxxxxxxx
Reply-to: chas3@xxxxxxxxxxxxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
In message <20030905115308.GA96209@xxxxxxxxxxxxxxxxx>,John Levon writes:
>There's no reason to allocate with GFP_ATOMIC in __alloc_atm_dev(). It has one
>callsite that is not under a spin lock (quick audit of drivers calling
>atm_dev_register() too).

it used to be under a spinlock (the infamous atm global spinlock).  that's
no longer the case so it doesnt need to be ATOMIC anymore.  i probably 
missed it when i fixed the spinlock.

dave, please apply to 2.6 (and 2.4) --thanks

[ATM]: remove unnecessary GFP_ATOMIC allocation (from levon@xxxxxxxxxxxxxxxxx)

diff -Naurp -X dontdiff linux-cvs/net/atm/resources.c 
linux-fixes/net/atm/resources.c
--- linux-cvs/net/atm/resources.c       2003-07-09 14:19:52.000000000 +0100
+++ linux-fixes/net/atm/resources.c     2003-09-05 13:14:08.000000000 +0100
@@ -30,7 +30,7 @@
 {
        struct atm_dev *dev;
 
-       dev = kmalloc(sizeof(*dev), GFP_ATOMIC);
+       dev = kmalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
                return NULL;
        memset(dev, 0, sizeof(*dev));



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