All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cedric Le Goater <clg@fr.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	video4linux-list@redhat.com,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	kraxel@bytesex.org, haveblue@us.ibm.com, serue@us.ibm.com,
	Containers@lists.osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kthread: saa7134-tvaudio.c
Date: Wed, 30 Aug 2006 18:30:27 +0200	[thread overview]
Message-ID: <44F5BD23.3000209@fr.ibm.com> (raw)
In-Reply-To: <20060829143902.a6aa2712.akpm@osdl.org>

Andrew Morton wrote:
> On Tue, 29 Aug 2006 14:15:55 -0700
> Sukadev Bhattiprolu <sukadev@us.ibm.com> wrote:
> 
>> Replace kernel_thread() with kthread_run() since kernel_thread()
>> is deprecated in drivers/modules. 
>>
>> Note that this driver, like a few others, allows SIGTERM. Not
>> sure if that is affected by conversion to kthread. Appreciate
>> any comments on that.
>>
> 
> hm, I think this driver needs more help.
> 
> - It shouldn't be using signals at all, really.  Signals are for
>   userspace IPC.  The kernel internally has better/richer/faster/tighter
>   ways of inter-thread communication.
> 
> - saa7134_tvaudio_fini()-versus-tvaudio_sleep() looks racy:
> 
> 	if (dev->thread.scan1 == dev->thread.scan2 && !dev->thread.shutdown) {
> 		if (timeout < 0) {
> 			set_current_state(TASK_INTERRUPTIBLE);
> 			schedule();
> 
>   If the wakeup happens after the test of dev->thread.shutdown, that sleep will
>   be permanent.
> 
> 
> So in general, yes, the driver should be converted to the kthread API -
> this is a requirement for virtualisation, but I forget why, and that's the
> "standard" way of doing it.
> 
> - The signal stuff should go away if at all possible.

The thread of this driver allows SIGTERM for some obscure reason. Not sure
why, I didn't find anything relying on it.

could we just remove the allow_signal() ?

C.

  parent reply	other threads:[~2006-08-30 16:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 21:15 [PATCH] kthread: saa7134-tvaudio.c Sukadev Bhattiprolu
2006-08-29 21:22 ` Dave Hansen
2006-08-29 21:39 ` Andrew Morton
2006-08-29 22:39   ` Eric W. Biederman
2006-08-30 12:39     ` Eric W. Biederman
2006-08-30 14:07       ` Cedric Le Goater
2006-08-30 15:43         ` Eric W. Biederman
2006-08-30 16:18           ` Cedric Le Goater
2006-08-30 16:35             ` [Devel] " Kirill Korotaev
2006-08-30 16:38             ` Kir Kolyshkin
2006-08-30 16:30   ` Cedric Le Goater [this message]
2006-08-30 16:49     ` Andrew Morton
2006-08-30 17:36       ` Mauro Carvalho Chehab
2006-08-31  1:02         ` Sukadev Bhattiprolu
2006-08-31  1:05         ` [PATCH] kthread: tvaudio.c Sukadev Bhattiprolu

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=44F5BD23.3000209@fr.ibm.com \
    --to=clg@fr.ibm.com \
    --cc=Containers@lists.osdl.org \
    --cc=akpm@osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=serue@us.ibm.com \
    --cc=sukadev@us.ibm.com \
    --cc=video4linux-list@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.