From: Andrew Morton <akpm@osdl.org>
To: Linus Torvalds <torvalds@osdl.org>,
David Howells <dhowells@redhat.com>,
"Maciej W. Rozycki" <macro@linux-mips.org>,
Roland Dreier <rdreier@cisco.com>,
Andy Fleming <afleming@freescale.com>,
Ben Collins <ben.collins@ubuntu.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH] Export current_is_keventd() for libphy
Date: Wed, 6 Dec 2006 23:49:42 -0800 [thread overview]
Message-ID: <20061206234942.79d6db01.akpm@osdl.org> (raw)
In-Reply-To: <20061206224207.8a8335ee.akpm@osdl.org>
On Wed, 6 Dec 2006 22:42:07 -0800
Andrew Morton <akpm@osdl.org> wrote:
> But I wouldn't want to think about an implementation as long as we have
> that WORK_STRUCT_NOAUTOREL horror in there. Can we just nuke that? Only
> three drivers need it and I bet they can be modified to use the usual
> mechanisms.
I guess I don't understand exactly what problem the noautorel stuff is
trying to solve. It _seems_ to me that in all cases we can simply stuff
the old `data' field in alongside the controlling work_struct or
delayed_work which wants to operate on it.
Bridge is the simple case..
diff -puN net/bridge/br_private.h~bridge-avoid-using-noautorel-workqueues net/bridge/br_private.h
--- a/net/bridge/br_private.h~bridge-avoid-using-noautorel-workqueues
+++ a/net/bridge/br_private.h
@@ -83,6 +83,7 @@ struct net_bridge_port
struct timer_list message_age_timer;
struct kobject kobj;
struct delayed_work carrier_check;
+ struct net_device *carrier_check_dev;
struct rcu_head rcu;
};
diff -puN net/bridge/br_if.c~bridge-avoid-using-noautorel-workqueues net/bridge/br_if.c
--- a/net/bridge/br_if.c~bridge-avoid-using-noautorel-workqueues
+++ a/net/bridge/br_if.c
@@ -83,14 +83,11 @@ static void port_carrier_check(struct wo
struct net_device *dev;
struct net_bridge *br;
- dev = container_of(work, struct net_bridge_port,
- carrier_check.work)->dev;
- work_release(work);
-
+ p = container_of(work, struct net_bridge_port, carrier_check.work);
+ dev = p->carrier_check_dev;
rtnl_lock();
- p = dev->br_port;
- if (!p)
- goto done;
+ if (!dev->br_port)
+ goto done; /* Can this happen? */
br = p->br;
if (netif_carrier_ok(dev))
@@ -280,7 +277,8 @@ static struct net_bridge_port *new_nbp(s
p->port_no = index;
br_init_port(p);
p->state = BR_STATE_DISABLED;
- INIT_DELAYED_WORK_NAR(&p->carrier_check, port_carrier_check);
+ p->carrier_check_dev = dev;
+ INIT_DELAYED_WORK(&p->carrier_check, port_carrier_check);
br_stp_port_timer_init(p);
kobject_init(&p->kobj);
_
What am I missing?
next prev parent reply other threads:[~2006-12-07 7:50 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 5:50 Ben Collins
2006-12-03 9:16 ` Andrew Morton
2006-12-04 19:17 ` Steve Fox
2006-12-05 18:05 ` Maciej W. Rozycki
2006-12-05 17:48 ` Maciej W. Rozycki
2006-12-05 18:07 ` Linus Torvalds
2006-12-05 19:31 ` Andrew Morton
2006-12-05 18:57 ` Andy Fleming
2006-12-06 12:31 ` Maciej W. Rozycki
2006-12-05 20:39 ` Andrew Morton
2006-12-05 20:59 ` Andy Fleming
2006-12-05 21:26 ` Andrew Morton
2006-12-05 21:37 ` Roland Dreier
2006-12-05 21:57 ` Andrew Morton
2006-12-05 23:49 ` Roland Dreier
2006-12-05 23:52 ` Roland Dreier
2006-12-06 15:25 ` Maciej W. Rozycki
2006-12-06 15:57 ` Andrew Morton
2006-12-06 17:17 ` Linus Torvalds
2006-12-07 1:21 ` Linus Torvalds
2006-12-07 6:42 ` Andrew Morton
2006-12-07 7:49 ` Andrew Morton [this message]
2006-12-07 10:29 ` David Howells
2006-12-07 10:42 ` Andrew Morton
2006-12-07 17:05 ` Jeff Garzik
2006-12-07 17:57 ` Andrew Morton
2006-12-07 18:17 ` Andrew Morton
2006-12-08 16:52 ` [PATCH] group xtime, xtime_lock, wall_to_monotonic, avenrun, calc_load_count fields together in ktimed Eric Dumazet
2006-12-09 5:46 ` Andrew Morton
2006-12-09 6:07 ` Randy Dunlap
2006-12-11 20:44 ` Eric Dumazet
2006-12-11 22:00 ` Andrew Morton
2006-12-13 21:26 ` [PATCH] Introduce time_data, a new structure to hold jiffies, xtime, xtime_lock, wall_to_monotonic, calc_load_count and avenrun Eric Dumazet
2006-12-15 5:24 ` Andrew Morton
2006-12-15 11:21 ` Eric Dumazet
2006-12-15 16:21 ` Eric Dumazet
2006-12-07 18:08 ` [PATCH] Export current_is_keventd() for libphy Maciej W. Rozycki
2006-12-07 18:59 ` Andy Fleming
2006-12-07 16:49 ` Linus Torvalds
2006-12-07 17:52 ` Andrew Morton
2006-12-07 18:01 ` Linus Torvalds
2006-12-07 18:16 ` Andrew Morton
2006-12-07 18:27 ` Linus Torvalds
2006-12-07 15:28 ` Maciej W. Rozycki
2006-12-06 17:43 ` David Howells
2006-12-06 17:50 ` Jeff Garzik
2006-12-06 18:07 ` Linus Torvalds
2006-12-06 17:53 ` Linus Torvalds
2006-12-06 17:58 ` Linus Torvalds
2006-12-06 18:33 ` Linus Torvalds
2006-12-06 18:37 ` Linus Torvalds
2006-12-06 18:43 ` David Howells
2006-12-06 19:02 ` Linus Torvalds
2006-12-06 18:02 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061206234942.79d6db01.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=afleming@freescale.com \
--cc=ben.collins@ubuntu.com \
--cc=dhowells@redhat.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=rdreier@cisco.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®