I gone ahead in my irq rewrite. Actually I can run UP and SMP fine and
also with CONFIG_RTC set everything runs fine (I don't need the RTC_LIGHT
patch anymore). There's to say that if somebody changes the frequency or
disable the RTC via /dev/rtc in an SMP kernel, the machine will become
unstable in SMP. But probably adding some __ifdef__ alpha in the RTC
device to avoid userspace to shutdown or change frequency to the RTC is
the right way to go. Actually it's not a security problem either as only
root can access the rtc device. So the additional __ifdef__ would protect
only from mistakes of the admin.

andrea@alpha:~ > cat /proc/interrupts
           CPU0       CPU1       TRY0       TRY1
  0:     636937          0     636937          0          XT-PIC  +timer
  1:       5555          0       5555          0          XT-PIC   keyboard
  2:          0          0          0          0          XT-PIC   cascade
  8:     615845          0     636855          0             RTC  +rtc
 12:          4          0          4          0          XT-PIC   PS/2 Mouse
 27:         13          0         13          0         TSUNAMI   eth0
 45:          6          0          6          0         TSUNAMI   eth1
 46:      14026          0      14026          0         TSUNAMI   sym53c8xx
 47:         37          0         37          0         TSUNAMI   sym53c8xx
LOC:     636855     636732

LOC is the smp_local timer irq. Actually I am running with CONFIG_RTC set
(to make hwclock happy ;) otherwise the timer irq handler would run on the
RTC_IRQ as usual.

The TRY are the attempt to run an irq. Not all attempts to run an irq
handler will have to run an irq handler. For example if we unmask the
timer irq on both cpus, then both CPU must try but only one must succeed.
So the CPU field must be increased by 1 only in one CPU, but the TRY field
will be increased by 1 on both CPUs. We may choose to disable the TRY
field for production later.

It seems rock solid. The patch will compile and run only on the dp264
platform.

        
ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.32pre2/alpha-irq-6.gz

So - now that irq.c is SMP safe and is more hackable - the next step is to
distribute irqs across all CPUs.

Comments and patches are welcome! Thanks.

Andrea

Reply via email to