Port-powerpc archive

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

Re: syscall trap patch review



manu%netbsd.org@localhost (Emmanuel Dreyfus) writes:

> I plan to commit this in order to greatly improve COMPAT_MACH
> performance on the PowerPC. Someone can review it to make sure it is
> okay?
> 
> The goal is to quickly return from two system calls, returning no
> error.

A couple of points:

First, I think if quick handling is your ultimate goal, you should
implement this in sctrap and spare yourself the complete frame
enter/leave, kernel/user SR setup/restore etc. overhead/mess.

Second, I'm not sure if this should be done without taking into
consideration the process' emulation. Presently it ought to be Ok,
though.

> Index: trap_subr.S
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/arch/powerpc/powerpc/trap_subr.S,v
> retrieving revision 1.29
> diff -r1.29 trap_subr.S
> 
> [...]
> 
> 747a758,768
> > #ifdef COMPAT_MACH
> > 2:
> >       FRAME_LEAVE(tempsave)
> >       mfcr    3
> >       lis     4,0x1000
> >       ori     3,3,4
> >       mtcr    3
> >       li      3,0
> >       li      4,0
> >       rfi
> > #endif

Third, I guess you meant to "or 3,3,4" here. (There's also an oris,
instruction, BTW.)


- Klaus



Home | Main Index | Thread Index | Old Index