Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
To: Keith Owens <kaos@ocs.com.au>
Cc: "'linux-mips@oss.sgi.com'" <linux-mips@oss.sgi.com>
Subject: Re: DBE table ordering
Date: Thu, 18 Apr 2002 16:03:40 +0400	[thread overview]
Message-ID: <3CBEB61C.BC6F1746@niisi.msk.ru> (raw)
In-Reply-To: 1661.1019123375@ocs3.intra.ocs.com.au

Keith Owens wrote:
> 
> On Thu, 18 Apr 2002 13:37:14 +0400,
> "Gleb O. Raiko" <raiko@niisi.msk.ru> wrote:
> >If you really hate this behaviour and want to change it, I guess just
> >linear serach is OK.
> 
> Performance matters for these tables.  It is worth doing one sort at
> boot time to let the kernel run faster all the time.  For some tables
> (ia64 unwind) the API mandates that the table be in ascending order.
> 

No, performance doesn't matter here. First, we are speaking about DBE
exception which slowdowns performance. Second, get/put_dbe are used for
peripherial accesses which are slow anyway. Third, do you really want to
speed up probe routines where those macros are used? I guess, not.

Then, how many addresses you have in your dbe_table, 1000 or 6 ? I guess
the latter. In the worst case, linear search requires 12 comparisons,
while binary search takes 6. 6 extra comparisons is nothing in the dbe
handler. If you have more than 6 addresses in the table, just replace
macros by routines and get exactly 6. And 6 comparisons, btw, there is
no need for loop, just 6 if-statements.

I dont't know about other tables and other arches. Perhaps, they need
sorting of some tables. But, definetely, sorting isn't required for mips
dbe/unaligned access tables.

Regards,
Gleb.

  reply	other threads:[~2002-04-18 12:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17 22:21 DBE table ordering Mark Huang
2002-04-18  3:55 ` Keith Owens
2002-04-18  6:39   ` Mark Huang
2002-04-18  6:39     ` Mark Huang
2002-04-18  6:51     ` Keith Owens
2002-04-18  6:51       ` Keith Owens
2002-04-18  9:37       ` Gleb O. Raiko
2002-04-18  9:49         ` Keith Owens
2002-04-18 12:03           ` Gleb O. Raiko [this message]
2002-04-18 17:59             ` Maciej W. Rozycki
2002-04-19  8:28               ` Gleb O. Raiko
2002-04-19 12:19                 ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CBEB61C.BC6F1746@niisi.msk.ru \
    --to=raiko@niisi.msk.ru \
    --cc=kaos@ocs.com.au \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox