Re: In-kernel tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/4/05, Oliver Korpilla <Oliver.Korpilla@xxxxxx> wrote:
> I'm currently putting some of the
> more performance-critical stuff into kernel space.

I think putting code in the kernel would not make that much of a
performance difference. One thing I can think of is that you wouldn't
have context switch overhead of a system call, but then it isn't very
reasonable to do things yourself that would otherwise be done cleanly
with a syscall.

Apart from that, probably the only reason to use kernel-space threads
would be for things you *wouldn't* be able to do with system calls,
but I don't think this is performance related.

> I did just wonder: Is there anything resembling a Linux process/thread
> or a VxWorks task in kernel space? Or this way round: Are there
> schedulable entities with priority able to run a function I supply.

I think what you're asking for is a kernel thread. You can start
kernel threads which are schedulable, or you can use tasklets.
Tasklets roughly speaking are code snippets that get regularly
executed by a kernel thread whose purpose is to run them depending on
their priority. But tasklets *aren't* schedulable by themselves and
they don't have context.

> It's important that there no such constraints like "only one per cpu" or
> "one in the whole system".

You may have multiple number of kthreads in a system.

Bahadir

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux