2003-06-30 16:57:41

by martin f krafft

[permalink] [raw]
Subject: restarting a kernel thread

i am doing some USB development these days and just managed to crash
khubd:

kernel: <6>note: khubd[9] exited with preempt_count 1

the system seems happy still, USB is not working anymore, though.

I have USB support built into the kernel, and a custom driver
written as a module.

Restarting would fix the problem and get USB back into operation,
but I am wondering if there is a way to restart the khubd kernel
thread manually. Is there?

I am soon going to switch to UML for this kind of development...

--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck

invalid PGP subkeys? use subkeys.pgp.net as keyserver!

stay the patient course.
of little worth is your ire.
the network is down.


Attachments:
(No filename) (769.00 B)
(No filename) (189.00 B)
Download all attachments

2003-06-30 17:45:48

by Greg KH

[permalink] [raw]
Subject: Re: restarting a kernel thread

On Mon, Jun 30, 2003 at 07:10:33PM +0200, martin f krafft wrote:
> i am doing some USB development these days and just managed to crash
> khubd:
>
> kernel: <6>note: khubd[9] exited with preempt_count 1
>
> the system seems happy still, USB is not working anymore, though.
>
> I have USB support built into the kernel, and a custom driver
> written as a module.
>
> Restarting would fix the problem and get USB back into operation,
> but I am wondering if there is a way to restart the khubd kernel
> thread manually. Is there?

Not really, sorry. Make usbcore a module and then just reload it will
work.

> I am soon going to switch to UML for this kind of development...

For USB development? Ok...please send us the patches that get USB
support working under UML as others have wanted to do this for quite
some time :)

Oh, what kind of driver are you working on?

thanks,

greg k-h

2003-06-30 19:33:53

by martin f krafft

[permalink] [raw]
Subject: Re: restarting a kernel thread

also sprach Greg KH <[email protected]> [2003.06.30.2000 +0200]:
> Not really, sorry. Make usbcore a module and then just reload it will
> work.

okay, that's an idea.

> For USB development? Ok...please send us the patches that get USB
> support working under UML as others have wanted to do this for quite
> some time :)

excellent. i am a little afraid that my kernel skills are too low
for this. maybe someone in my team will actually get around to do
it, because UML would really help us!

> Oh, what kind of driver are you working on?

DC motor controllers, Servo motor controllers and A/D converters.
galilmc.com is too expensive for my taste. i work on robots...

take care,

--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck

invalid PGP subkeys? use subkeys.pgp.net as keyserver!

"finally, we have a president who knows
how to run the government like a business.
presuming the business is pets.com."
-- gail collins


Attachments:
(No filename) (1.03 kB)
(No filename) (189.00 B)
Download all attachments

2003-06-30 20:26:43

by Greg KH

[permalink] [raw]
Subject: Re: restarting a kernel thread

On Mon, Jun 30, 2003 at 09:48:07PM +0200, martin f krafft wrote:
> > Oh, what kind of driver are you working on?
>
> DC motor controllers, Servo motor controllers and A/D converters.
> galilmc.com is too expensive for my taste. i work on robots...

Any reason for not sticking with userspace programs using libusb/usbfs?
Much easier to write than kernel drivers, and you get portibility
across a wider range of OSs

thanks,

greg k-h

2003-06-30 21:21:55

by martin f krafft

[permalink] [raw]
Subject: Re: restarting a kernel thread

also sprach Greg KH <[email protected]> [2003.06.30.2239 +0200]:
> Any reason for not sticking with userspace programs using libusb/usbfs?
> Much easier to write than kernel drivers, and you get portibility
> across a wider range of OSs

Well, that's a good idea. Problem is that the drivers are actually
written by someone else. I just developing with them, and them
a little on the side.

But I'll pass the word on to the developers. Is this an easy
transition?

--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck

invalid PGP subkeys? use subkeys.pgp.net as keyserver!

"the public is wonderfully tolerant.
it forgives everything except genius."
-- oscar wilde


Attachments:
(No filename) (793.00 B)
(No filename) (189.00 B)
Download all attachments

2003-06-30 21:30:05

by Greg KH

[permalink] [raw]
Subject: Re: restarting a kernel thread

On Mon, Jun 30, 2003 at 11:39:57PM +0200, martin f krafft wrote:
> also sprach Greg KH <[email protected]> [2003.06.30.2239 +0200]:
> > Any reason for not sticking with userspace programs using
> > libusb/usbfs? Much easier to write than kernel drivers, and you
> > get portibility across a wider range of OSs
>
> One question: will this have performance issues? We are dealing with
> high-resolution motors and sensors, and want to go real-time anyhow
> somewhen.

Don't know, you will have to test to see if it meets your latency
requirements.


On Mon, Jun 30, 2003 at 11:36:04PM +0200, martin f krafft wrote:
>
> Well, that's a good idea. Problem is that the drivers are actually
> written by someone else. I just developing with them, and them
> a little on the side.
>
> But I'll pass the word on to the developers. Is this an easy
> transition?

The interface is quite different from writing a kernel driver, but in
the end, simpler, as you can just debug from userspace and not worry
about kernel problems.

thanks,

greg k-h

2003-06-30 21:27:12

by martin f krafft

[permalink] [raw]
Subject: Re: restarting a kernel thread

also sprach Greg KH <[email protected]> [2003.06.30.2239 +0200]:
> Any reason for not sticking with userspace programs using
> libusb/usbfs? Much easier to write than kernel drivers, and you
> get portibility across a wider range of OSs

One question: will this have performance issues? We are dealing with
high-resolution motors and sensors, and want to go real-time anyhow
somewhen.

--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck

invalid PGP subkeys? use subkeys.pgp.net as keyserver!

<woot> "what do you mean it's not packaged in debian?"


Attachments:
(No filename) (621.00 B)
(No filename) (189.00 B)
Download all attachments

2003-07-01 06:17:00

by Oleg Drokin

[permalink] [raw]
Subject: Re: restarting a kernel thread

Hello!

On Mon, Jun 30, 2003 at 11:00:02AM -0700, Greg KH wrote:

> > I am soon going to switch to UML for this kind of development...
> For USB development? Ok...please send us the patches that get USB
> support working under UML as others have wanted to do this for quite
> some time :)

The patches are at http://jmcmechan.linuxdriven.net
2.4 seems to be working and 2.5 ones are a bit outdated.
Still this is probably a better start than no patches at all ;)

Bye,
Oleg