Re: superpage plans



On Thursday 23 November 2006 14:28, Bruce Evans wrote:
On Thu, 23 Nov 2006, David Xu wrote:
On Thursday 23 November 2006 11:25, Bruce Evans wrote:
On Wed, 22 Nov 2006, Alan Cox wrote:
There is only one caveat. Idle-time page prezeroing is not supported.
However, ever since the VM system emerged from the Giant kernel lock,
I've seen little or no benefit from it. ...

That's probably because PREEMPTION is broken and the brokenness turns
idle-time page prezeroing into a pessimization. Without PREEMPTION I
see much the same benefits from idle-time page prezeroing as in RELENG_4
-- a speedup of a few percent for makeworld. E.g., for makeworld -j4

I think on SMP, the BSD scheduler code does not preempt an idle
thread in remote cpu, this might explain the reason why page_zero
uses much time on SMP. the maybe_preempt() only works
for current cpu.

See my previous mail to freebsd-arch about this. IPI_PREEMPTION should
result in preempting pgzero, but doesn't seem to, and if it did then
you would wish it wouldn't since it has larger overheads than voluntarility
giving up control. For user idle threads, there is nothing better
than sending an IPI, but pgzero does a good job of limiting itself so
preempting it just pessimizes it. Even non-IPI preemption will sometimes
have higher overheads.

Bruce

Do you really believe IPI_PREEMPTION works as expected ? the problem
is in sched_4bsd.c, the remote cpu running an idle cpu is only
interrupted by IPI_AST not IPI_PREEMPT, IPI_AST has no effect for kernel
thread, note that kick_other_cpu is only used for bound thread which is
being resumed, kick_other_cpu does send IPI_PREEMPT, though pagezero
thread is a bound thread in most time, but it is not the case that
kick_other_cpu will be used, we want to preempt it not resuem it, so
PREEMPTION and IPI_PREEPMTION do not work for pagezero thread running
on remote cpu.

David Xu
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: superpage plans
    ... Without PREEMPTION I ... thread in remote cpu, this might explain the reason why page_zero ... result in preempting pgzero, but doesn't seem to, and if it did then ... have higher overheads. ...
    (freebsd-arch)
  • Re: superpage plans
    ... -- a speedup of a few percent for makeworld. ... With idlezero enabled and PREEMPTION not enabled in the above, pgzero ... any userland idle priority threads that want to run all the time. ...
    (freebsd-arch)
  • Re: superpage plans
    ... That's probably because PREEMPTION is broken and the brokenness turns ... -- a speedup of a few percent for makeworld. ... any userland idle priority threads that want to run all the time. ... UP systems benefit less than SMP ones since they have a lower percentage ...
    (freebsd-arch)
  • RE: Latency traces I cannot interpret (sa1100, 2.6.15-rc7-rt1)
    ... for instance you'll get a situation when preemption is off, interrupts ... >> we should never have preemption disabled in cpu_idle. ... > That 9 ms latency seems to be really *idle* time! ... > identical to the 9 ms idle trace, ...
    (Linux-Kernel)