Re: Schedule() call in driver context.

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

 



Hi Greg,

Thanks for your message.

You're right that fewer kernels have this, I thought that since
CONFIG_PREEMPT documentation says its for low latency desktops (so
that processes don't wait and the UI is more responsive), most desktop
distros would have it enabled. But even on my Ubuntu 9.10 kernel
2.6.31-14 , seems its not the case.

Anyway I was just making a point :) But I guess there's still no
excuse for a driver to not sleep if its not doing anything.

Regards,
-Joel

On Mon, Feb 22, 2010 at 11:53 PM, Greg Freemyer <greg.freemyer@xxxxxxxxx> wrote:
> On Sat, Feb 20, 2010 at 2:01 AM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote:
>>> In fact the "kernel" is not interrupt-able in linux as I recall.  Thus
>>> a misbehaving driver that enters an infinite loop will hang the whole
>>> machine.
>> ...
>>> Another way to ask your question is "Why isn't the linux kernel itself
>>> timesliced?"
>>
>> AFAIK, What you're talking about is a kernel compiled with "voluntary"
>> preemption.. Isn't it true that in non-voluntary preemption
>> (CONFIG_PREEMPT=y), the kernel execution itself can be
>> preempted/interrupted when it is not in a spin lock guarded critical
>> region?
>>
>> And since we're talking about sleeping, we're not in a critical region
>> anyway (we're not supposed sleep in these AFAIK)
>>
>> Let me know your thoughts & Thanks,
>> -Joel
>
> Joel,
>
> I think your right, but I also think (or at least suspect) that most
> distros are currently not setting CONFIG_PREEMPT=y.
>
> I'm running OpenSuse 11.2 with the 2.6.31 kernel currently:
>
>> zcat /proc/config.gz | grep CONFIG_PREE
> # CONFIG_PREEMPT_RCU is not set
> # CONFIG_PREEMPT_RCU_TRACE is not set
> CONFIG_PREEMPT_NOTIFIERS=y
> CONFIG_PREEMPT_NONE=y
> # CONFIG_PREEMPT_VOLUNTARY is not set
> # CONFIG_PREEMPT is not set
>
> So I should have remembered about CONFIG_PREEMPT but my explanation
> was right for at least some distro kernels.
>
> Greg
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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