Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Matti Aarnio <matti.aarnio@sonera.fi>
To: axp-list@redhat.com
Subject: Re: > 1GB on alpha. Patch to 1TB?
Date: Mon, 15 Mar 1999 11:59:06 +0200 (EET)	[thread overview]
Message-ID: <19990315095917Z92257-406+15@mea.tmt.tele.fi> (raw)
In-Reply-To: <199903142119.NAA08401@icarus.com> from Stephen Williams at "Mar 14, 99 01:19:18 pm"

Stephen Williams <steve@icarus.com> wrote:
> lindahl@cs.virginia.edu said:
> > The driver isn't allocating the buffer space, except for bounce
> > buffers. In the scheme you have outlined, this device will never be
> > efficiently supported.
> 
> ??!
> 
> And how are the bounce buffers allocated? I must be missing something.
> 
> If the driver doesn't allocate buffer space, the buffer allocation
> won't affect it, right?
> 
> If the driver does direct DMA to a user buffer, and the user's page is
> in physical memory out of range of the device addressing capabilities,
> then something is going to have to change. Either the hardware is extended
> by magic motherboard support, or the driver allocates a buffer that the
> device *can* write to.
>
> What else can be done? This is true now and has nothing to do with my
> allocator interface suggestion.

	I would like to add a layer of that "magic" motherboard support,
	which in case of Alpha systems means IO-bus specific scatter-
	gather address mapping from a fairly small window (usually around
	8 M to the entire system memory.  If the system does not need to
	care about ISA-bus things, a much larger window of temporary mappings
	can be used.  Needed mapping space is about 1/1000 or 1/500 of the
	memory window used for the mapping.  Maybe management datasets will
	need to double the space expenditure, but if you can manage maps to
	e.g. 8G memory with mere 32kB datasets, why would you not do it?)

	What would it need ?

	When a physical address is to be added into a driver pointers,
	that address should be mapped either thru a direct-map window,
	or a scatter-gather window. (In most chipsets there seem to be
	only one scatter-gather window mechanism, even though any of the
	usually four address windows can be used for it.)

	For ephemeral mappings a fast lookup mechanisms are needed to
	find next free entry, and to find possibly existing mapping
	already covering given memory address.

	Also a fast way to move used (and no longer needed) mapping slot
	into a free list is needed.

	It is likely that e.g. for skbuf content pointers several skbuffs
	will reside in the same 8kB page, and thus a definite 'in use
	count' is needed at each mapping slot.

	Once the basic mapping machinery exists, the way to modify the
	drivers would simply be something like:
		busaddr = BUSSGMAPPER(memaddress);
	where the macro hides away most of the painfull details..
	... for that matter, in fact that 'BUSSGMAPPER()' can be called
	'virt_to_bus()', in which case we wont need to touch into most
	of the driver source -- except that all SG mapping RELEASES
	still need doing at some point, e.g.:
		'bus_map_release(busaddr);'

	Hmm... but still there is lack of call parameter above, at what
	IO-bus the given device is operating must be given above, thus
	likely changeing the current:
		virt_to_bus(memaddress)
	to something like:
		virt_to_bus(memaddress,dev->bus)

	Admittedly in most cases especially the 'pci_bus' thing refers
	to a bridged segment under the same pci/memory controller, but
	getting the system to run at e.g. DEC 8400 system requires support
	for multiple IO-bus controller modules.  Possibly the PCI-bus
	index will do it thru some additional mapping.  However do note
	that we will need quite often also separate bus-entries for all
	instances of ISA limited bus-master devices.

> I'm just suggesting that if the driver must allocate buffer space that
> the device can access, the kernel allocator should provide a means for
> the driver to make that request. Currently, there is the GFP_DMA flag,
> but I'm suggesting generalizing that by simply saying to the allocator
> how many bits of address the device has. That's 32 bits in the case of
> most PCI devices. (Many do support DAC that gets one up to 64 at the
> expense of a bus cycle.)

	Hmm...  Yes, these measures (e.g. GFP_DMAPCI32) may be needed
	for systems which don't have 'magic motherboard support'.
	(Which covers all of intel systems, I think..)

> -- 
> Steve Williams                "The woods are lovely, dark and deep.
> steve@icarus.com              But I have promises to keep,

/Matti Aarnio <matti.aarnio@sonera.fi>


  parent reply	other threads:[~1999-03-15 10:10 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-11  5:57 > 1GB on alpha. Patch to 1TB? Bob McElrath
1999-03-11  6:13 ` Greg Lindahl
1999-03-11  7:14   ` Gerhard Schneider
1999-03-11 17:17     ` Maurice Hilarius
1999-03-11 20:03     ` Greg Lindahl
1999-03-11 16:50   ` Ron Farrer
1999-03-11 17:19     ` Maurice Hilarius
1999-03-11 17:39       ` Ron Farrer
1999-03-11 18:17         ` Maurice Hilarius
1999-03-11 18:31           ` Ron Farrer
1999-03-12  0:47   ` Steve Frampton
1999-03-12  1:01     ` Larry Snyder
1999-03-12  1:31       ` mgraffam
1999-03-12  4:51         ` Izaak Bozof
1999-03-13 18:45 ` Richard Henderson
1999-03-13 18:50   ` Matthew Jacob
1999-03-13 23:58     ` Stephen Williams
1999-03-14 21:04       ` Matthew Jacob
1999-03-13 19:16   ` Dave Gilbert
1999-03-13 23:57   ` Stephen Williams
1999-03-14  3:18     ` Matti Aarnio
1999-03-15 22:47       ` Greg Lindahl
1999-03-15 23:02         ` Matti Aarnio
1999-03-16  5:25           ` Jay.Estabrook
1999-03-14  3:21     ` Richard Henderson
1999-03-14  5:51       ` Stephen Williams
1999-03-14 17:59         ` Greg Lindahl
1999-03-14 20:45           ` Stephen Williams
1999-03-14 20:50             ` Greg Lindahl
1999-03-14 21:19               ` Stephen Williams
1999-03-14 21:44                 ` Greg Lindahl
1999-03-15  9:59                 ` Matti Aarnio [this message]
1999-03-15 16:52                   ` Stephen Williams
1999-03-15 17:03                     ` Matthew Jacob
1999-03-14 18:23       ` Greg Lindahl
  -- strict thread matches above, loose matches on Subject: below --
1999-03-11 20:28 Anders Blicher Petersen
     [not found] <199903132048.VAA11627@sunsite.mff.cuni.cz>
1999-03-13 21:17 ` Matthew Jacob
1999-03-14 16:02 ` Jay.Estabrook
1999-03-15 19:14   ` James H. Cloos Jr.
1999-03-15 19:41     ` Michal Jaegermann
1999-03-15 21:46       ` Matti Aarnio
1999-03-16  1:42         ` Richard Henderson
1999-03-16  6:04         ` Mike
1999-03-16  6:25           ` Ron Farrer
1999-03-16  6:28             ` Mike
1999-03-16  0:34     ` Bob McElrath
1999-03-16  5:12       ` Jay.Estabrook
1999-03-16 13:09         ` Greg Lindahl
1999-03-16 18:08           ` Jay.Estabrook
     [not found] <19990315002405.A2138@alpha.franken.de>
1999-03-15  0:54 ` Jay.Estabrook
read-only archive

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