Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Re: Tags are dead alias Milo is dead part II
       [not found] <19981007002547.44731@alpha.franken.de>
@ 1998-10-08 15:03 ` ralf
  1998-10-08 19:58   ` Thomas Bogendoerfer
  0 siblings, 1 reply; 3+ messages in thread
From: ralf @ 1998-10-08 15:03 UTC (permalink / raw)
  To: Thomas Bogendoerfer, linux-mips, linux-mips, linux

On Wed, Oct 07, 1998 at 12:25:47AM +0200, Thomas Bogendoerfer wrote:

> In the process of making Milo obsolete I've also removed tags stuff. This
> was simple for the Indy and took only a few hours for the Olivetti. I hope
> it's also possible for the Decstation. Before I'll start commiting the changes
> we should make sure, how to solve the missing tags for all plattforms.
> 
> Another old code, which might be obsolete now is the wired entry stuff
> in arch/mips/kernel/head.S. It's already disabled for R4k CPUs and
> I would prefer to remove that stuff also for the other CPUs. If you
> need wired entries, I would propose using the add_wired_entry()
> function as I already do it for the JAZZ hardware (arch/mips/jazz/setup.c).

People should consider that TLB entries are a scarce resource.  Wiring them
can seriously impact performance.  (Which reminds me of the lock warning
bit in the 68851 - Moto people we seriously assuming somebody could wire all
ATC (that is TLB in Moto slang) entries ...)

Our current 32 bit page table structure is good for mapping everything in
the lowest 4gb of physical address space.  Things outside of this area are
the only things which will need to be mapped by some other mean.  We've
so far used wired entries which in most cases they're a bad idea for the
above mentioned reason.  Since loading and flushing a single TLB entry is
a quite cheap thing on MIPS parts of the kernel could do things like

	struct wired {
		caddr_t physical;
		caddr_t virtual;
		u32	mask;
		u32	usage;
		u8 entry;
	} gfx_entry = {
		GFX_PBASE,
		GFX_VBASE,
		PM_4M
	};

	entry = load_wired_entry(&gfx_entry);

	... /* Munge mapped address space */

	flush_wired_entry(entry);

Applied to the G364 drivers (which as of now is still MIPS specific anyway)
this means that we'll avoid TLB trashing in the case of scrolling and have
the full TLB available for userland.

The second alternative which can be used where it's ok to disable interrupts
is to access memory using one of the XKPHYS segments.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Tags are dead alias Milo is dead part II
  1998-10-08 15:03 ` Tags are dead alias Milo is dead part II ralf
@ 1998-10-08 19:58   ` Thomas Bogendoerfer
  1998-10-08 20:30     ` William J. Earl
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Bogendoerfer @ 1998-10-08 19:58 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, linux-mips, linux

On Thu, Oct 08, 1998 at 05:03:35PM +0200, ralf@uni-koblenz.de wrote:
> Applied to the G364 drivers (which as of now is still MIPS specific anyway)
> this means that we'll avoid TLB trashing in the case of scrolling and have
> the full TLB available for userland.

I don't believe this will buy us anything. When we add a temporary TLB we need
do clear one TLB, which might be used by the userland. So we end up loading
our wired entry, killing it, and later the user process has to reload the 
TLB again. This way we force TLB trashing, with one wired entry more we
_might_ get a little bit more TLB trashing.

As you might know, I'm using three wired entries for the Magnum, and I don't 
think doing the same trick for the other entries is a real good idea. When 
we make them temporary, we have to mess with TLBs on every interrupt.

Thomas.

-- 
   This device has completely bogus header. Compaq scores again :-|
It's a host bridge, but it should be called ghost bridge instead ;^)
                                        [Martin `MJ' Mares on linux-kernel]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Tags are dead alias Milo is dead part II
  1998-10-08 19:58   ` Thomas Bogendoerfer
@ 1998-10-08 20:30     ` William J. Earl
  0 siblings, 0 replies; 3+ messages in thread
From: William J. Earl @ 1998-10-08 20:30 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: ralf, linux-mips, linux-mips, linux

Thomas Bogendoerfer writes:
 > On Thu, Oct 08, 1998 at 05:03:35PM +0200, ralf@uni-koblenz.de wrote:
 > > Applied to the G364 drivers (which as of now is still MIPS specific anyway)
 > > this means that we'll avoid TLB trashing in the case of scrolling and have
 > > the full TLB available for userland.
 > 
 > I don't believe this will buy us anything. When we add a temporary TLB we need
 > do clear one TLB, which might be used by the userland. So we end up loading
 > our wired entry, killing it, and later the user process has to reload the 
 > TLB again. This way we force TLB trashing, with one wired entry more we
 > _might_ get a little bit more TLB trashing.
 > 
 > As you might know, I'm using three wired entries for the Magnum, and I don't 
 > think doing the same trick for the other entries is a real good idea. When 
 > we make them temporary, we have to mess with TLBs on every interrupt.

     You could do what IRIX does in some cases, which is to save and restore
the TLB entry you replace.  Beware of doing this, however, if your code could
take a page fault.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-10-08 20:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <19981007002547.44731@alpha.franken.de>
1998-10-08 15:03 ` Tags are dead alias Milo is dead part II ralf
1998-10-08 19:58   ` Thomas Bogendoerfer
1998-10-08 20:30     ` William J. Earl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox