* Re: Linux-2.1.4
[not found] <Pine.LNX.3.91.961017082647.20618H-100000@linux.cs.Helsinki.FI>
@ 1996-10-17 10:00 ` Ingo Molnar
1996-10-17 22:30 ` Linux-2.1 Marin Purgar - PMC
1 sibling, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 1996-10-17 10:00 UTC (permalink / raw)
On Thu, 17 Oct 1996, Linus Torvalds wrote:
[cool description about the new exception logic]
> And eventually, when the exception code has matured, I can actually remove
> the "sanity check" code, and then the exception count tests are not needed
> any more, so the above shrinks down to just
>
> movl $1f,%edx /* tell the exception code where to abort */
> movl xxxx,%eax /* get the value */
> xorl %edx,%edx /* no error if we got here */
> 1:
could it be optimized even one step further? We could do the following:
movl xxxx,%eax /* get the value */
the exception handler could maintain a cross-table that identifies EIPs
and abort points. It would do something like this:
jmp UGLY_AS_HELL_BUT_FAST_AS_LIGHTNING_CROSSJUMP_TABLE[exception_eip]
This the complexity of deciding what to do is pushed one step further into
the exception handler routines. And we would need even more ugly macroes
that set up this table ... but it looks reasonable for the first sight.
[ actually, we possibly dont even need such a table, the exception code
could just do a very simple (and fast) deassembly of the exception EIP,
and could decide where to jump ]
[ and who cares about exception handling complexity ... bad guys should
pay their price for a -EFAULT ]
> It's the RISC philosophy: make the basic operations simple, and do them
> extremely quickly. Complex operations might be slower, but complex operations
> are relatively rare.
lets push it to the extreme ...
-- mingo
--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Linux-2.1.
[not found] <Pine.LNX.3.91.961017082647.20618H-100000@linux.cs.Helsinki.FI>
1996-10-17 10:00 ` Linux-2.1.4 Ingo Molnar
@ 1996-10-17 22:30 ` Marin Purgar - PMC
1 sibling, 0 replies; 2+ messages in thread
From: Marin Purgar - PMC @ 1996-10-17 22:30 UTC (permalink / raw)
Hi!
On Thu, 17 Oct 1996, Linus Torvalds wrote:
>
> Now, because the checking cannot be moved outside the loop, some loops have
> to be moved inside the checking if we want to have the best possible
> performance. That's why I want to add the new functions "clear_user()" and
> "strncpy_from_user()" : those are things where we're currently looping
> outside the exception code for no really good reason (as a side note: those
> are also things that generally need architecture-specific functions for the
> best performance anyway).
There is still issue (tought not directly related to kernel source). What
to do with such functions when the exception occurs in the middle of
user space cleared, copyed from or copyed to (assuming functions as
clear_user, strncpy_from_user, strncpy_to_user) ? Should they return the
acctual number of bytes cleared/trensfered or just EINVAL assuming the
function has failed completly (even if some partition of memory was
cleared/transfered) ?
> All the other loops I have looked through that do checking inside the loop
> are not really a problem. They do some non-trivial operation on the data
> inside the loop (translating a byte with opost processing in the case of the
> tty layer, for example), and as such the very small overhead caused by the
> exception handling isn't really an issue.
>
bb4now,
PMC
--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
^ permalink raw reply [flat|nested] 2+ messages in thread