Re: New pre-patch (Re: [PATCH] kswapd fully sysctl tunable)

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Sun, 3 May 1998 11:25:35 +1000


Linus Torvalds writes:
>
>
> On Sat, 2 May 1998, Rik van Riel wrote:
> >
> > It probably should limit the dcache size to some percentage
> > of memory, when memory is tight.
> > I'll maybe take a look at it...
>
> Could you test relative to pre-100 (on ftp.kernel.org now), which moves
> the dcache shrinking into the regular memory de-allocation loop, and while
> the exact shrinking speed is probably completely off, it should be able to
> react much better to small-memory machines than the hardcoded shrink did..
>
> Also, for those that appear to still have SMP interrupt stability
> problems, Ingo pointed out that we may have problems with PCI
> level-triggered interrupts. Could those people please test an additional
> small patch that involves moving the "ack_APIC_irq();" inside
> arch/i386/kernel/irq.c: do_ioapic_IRQ() from the top of the function to
> the very bottom of that function (that will move it to outside the irq
> controller lock, but it should actually be perfectly ok in this case).

Well, I've just tried this and I still get lost interrupts.
Just to make sure I've understood your instructions correctly, I've
appended do_ioapic_IRQ() from my source tree.

Also, when I rebooted I got a message about SMP IPI stuck in
invalidate or something like that. The message flashed on *just*
before the system rebooted.

Regards,

Richard....

static void do_ioapic_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
{
irq_desc_t *desc = irq_desc + irq;

spin_lock(&irq_controller_lock);

desc->ipi = 0;

/* If the irq is disabled for whatever reason, just set a flag and return */
if (desc->status & (IRQ_DISABLED | IRQ_INPROGRESS)) {
desc->events = 1;
spin_unlock(&irq_controller_lock);
return;
}

desc->status = IRQ_INPROGRESS;
desc->events = 0;
hardirq_enter(cpu);
spin_unlock(&irq_controller_lock);

while (test_bit(0,&global_irq_lock)) barrier();

for (;;) {
int pending;

/* If there is no IRQ handler, exit early, leaving the irq "in progress" */
if (!handle_IRQ_event(irq, regs))
goto no_handler;

spin_lock(&irq_controller_lock);
pending = desc->events;
desc->events = 0;
if (!pending)
break;
spin_unlock(&irq_controller_lock);
}
desc->status &= IRQ_DISABLED;
spin_unlock(&irq_controller_lock);

no_handler:
hardirq_exit(cpu);
release_irqlock(cpu);

/* Ack the irq inside the lock! */
ack_APIC_irq();
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu