| 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> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH][ATM] a few patches from John Levon, chas williams |
|---|---|
| Next by Date: | Re: [PATCH 2.5.72] Red Creek VPN update, Matthew G. Marsh |
| Previous by Thread: | Re: [VLAN] Re: [PATCH/RFC] disallow vlan devices on top of a logical bridge device, Peter Stuge |
| Next by Thread: | Re: [Linux-ATM-General] [PATCH] ATM - remove unnecessary GFP_ATOMIC allocation, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |