mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/3] kthread: update the s390 lcs driver to use kthread
@ 2006-08-24 21:23 Serge E. Hallyn
  2006-08-25 14:41 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Serge E. Hallyn @ 2006-08-24 21:23 UTC (permalink / raw)
  To: lkml, djbarrow, fpavlic, Martin Schwidefsky

Update the s390 Lan Channel Station Network Driver, which can be
compiled as a module, to use kthread, rather than kernel_thread
whose EXPORT_SYMBOL has been deprecated.

Compiles and boots fine.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>

---

 drivers/s390/net/lcs.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

4a9f3cfc86c034a4b9fb31f9939d7c457b41f9cd
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 2eded55..e4f9850 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -36,6 +36,7 @@
 #include <linux/in.h>
 #include <linux/igmp.h>
 #include <linux/delay.h>
+#include <linux/kthread.h>
 #include <net/arp.h>
 #include <net/ip.h>
 
@@ -1249,7 +1250,6 @@ lcs_register_mc_addresses(void *data)
 	struct in_device *in4_dev;
 
 	card = (struct lcs_card *) data;
-	daemonize("regipm");
 
 	if (!lcs_do_run_thread(card, LCS_SET_MC_THREAD))
 		return 0;
@@ -1729,11 +1729,11 @@ lcs_start_kernel_thread(struct lcs_card 
 {
 	LCS_DBF_TEXT(5, trace, "krnthrd");
 	if (lcs_do_start_thread(card, LCS_RECOVERY_THREAD))
-		kernel_thread(lcs_recovery, (void *) card, SIGCHLD);
+		kthread_run(lcs_recovery, (void *) card, "lcs_recover");
 #ifdef CONFIG_IP_MULTICAST
 	if (lcs_do_start_thread(card, LCS_SET_MC_THREAD))
-		kernel_thread(lcs_register_mc_addresses,
-				(void *) card, SIGCHLD);
+		kthread_run(lcs_register_mc_addresses,
+				(void *) card, "regipm");
 #endif
 }
 
@@ -2236,7 +2236,6 @@ lcs_recovery(void *ptr)
         int rc;
 
 	card = (struct lcs_card *) ptr;
-	daemonize("lcs_recover");
 
 	LCS_DBF_TEXT(4, trace, "recover1");
 	if (!lcs_do_run_thread(card, LCS_RECOVERY_THREAD))
-- 
1.1.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/3] kthread: update the s390 lcs driver to use kthread
  2006-08-24 21:23 [PATCH 2/3] kthread: update the s390 lcs driver to use kthread Serge E. Hallyn
@ 2006-08-25 14:41 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2006-08-25 14:41 UTC (permalink / raw)
  To: Serge E. Hallyn; +Cc: lkml, djbarrow, fpavlic, Martin Schwidefsky

On Thu, Aug 24, 2006 at 04:23:23PM -0500, Serge E. Hallyn wrote:
> Update the s390 Lan Channel Station Network Driver, which can be
> compiled as a module, to use kthread, rather than kernel_thread
> whose EXPORT_SYMBOL has been deprecated.

NACK.  Again a simple s/kernel_thread/kthread_run/ is not what we
need, you need to rething whats going on.  And the thread usage in
lcs is really bad :)

I'm not even sure why it creates all these short-lived threads,
but to fix this mess we might need a new function in kthread.c
that start a thread asynchronously so we can kill all the
workqueue mess in the various s390 net drivers and some other
places.

I'd suggest to start with getting a coherent description of what
those threads actually try to solve from the driver maintainer.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-25 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-24 21:23 [PATCH 2/3] kthread: update the s390 lcs driver to use kthread Serge E. Hallyn
2006-08-25 14:41 ` Christoph Hellwig

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®