kernel version
jon
jon at jonshouse.co.uk
Sun Feb 24 14:43:20 EST 2013
On Sun, 2013-02-24 at 19:15 +0100, Sascha Herrmann wrote:
> > Im dubious .....
>
> >
> > Last time I checked the Broadcom specific nonsense was patched into the
> > kernel.
>
> maybe someone just wants it...
They need it, not the same thing. I'm probably being harsh, i've not
looked at the loading mechanism for the Pi kernel yet.
> > I cant find a raspian kernel sources package that corresponds
> > to the running kernel so i'm suspicious that it might not be as simple
> > as it should. As is typical with linux its not documented and any docs
> > I find are out of date or don't correspond to the raspian specific
> > packages.
>
> google helps: http://elinux.org/RPi_Kernel_Compilation and no, you don't
> need any cross compiler, you can compile it on the rpi (will take some
> hours).
>
> > Why the hell the preempt cant be toggled on/off from user space is a
> > mystery - its just a timer on an IRQ why cant I simply turn the timer
> > off.
> You are sure you understand, what preempt is about?
To me (an old bald man who remembers 8088 CPUs) preemption is to enter
the kernel on a hardware timer interrupt allowing the scheduler to do
its thing without a process making an explicit kernel call. IE hardware
timer tick based scheduling rather than co-operative. I assume (having
read the docs) that the preempt patch modifies the kernel with some
extra locks or critical sections and allows a hardware timer to tick to
drive the scheduler in parallel to the normal yeild mechanism. Am I
close ?
> Why do you think,
>that preempt harms you application?
The question was really a Pi specific follow up to my lkml post :
"Stupid user with user-space questions, matrix LED driving with user
space code only"
I am driving LED signs with a user space application. For some parts of
my code I need to generate small accurate amounts of time for a pulse on
a GPIO pin. Most of the time this works well except when an IRQ comes
in or even worse preemption allows the kernel to do its scheduler logic
during my timing code causes it schedule the process back in late.
http://www.jonshouse.co.uk/ledsign.cgi
Yes, I know I could write it as a kernel module, one day when I have the
time I even might...
I am making a new sign, this one is fairly small (1/2 meter wide) making
the timing jitter visible. I can cure the problem by adding a PIC to the
hardware or using the Pi hardware PWM hardware to generate the pulse,
but these are both effort and time.
http://www.jonshouse.co.uk/download/128x32_red_green_led_sign.tar.gz
Thanks,
Jon
More information about the linux-rpi-kernel
mailing list