linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddedalley.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Timur Tabi <timur@freescale.com>
Subject: Re: Discussion about iopa()
Date: Sat, 10 Feb 2007 17:27:28 -0500	[thread overview]
Message-ID: <8D2A12A2-EB11-497C-AF4C-FDD95088E968@embeddedalley.com> (raw)
In-Reply-To: <1171143649.20494.31.camel@localhost.localdomain>


On Feb 10, 2007, at 4:40 PM, Benjamin Herrenschmidt wrote:

> I still think that it's preferable to simply obtain the physical  
> address
> along with the virtual one when allocating/creating an object (and  
> thus
> have the allocator for those object types, like rheap for MURAM,  
> return
> it, the same way the coherent dma allocator does).

I'd agree, but we don't have any functions to deal with this.
It's been an issue ever since I ported the first 8xx many
years ago.  The arguments range from "it's too specialized"
or "fit it under something else" that isn't appropriate, or
it's yet another resource allocator with it's own set of
management APIs (which I think is silly, but seems to be
the way of Linux).  Worse, we just hack something to
"fix another day", which never happens :-)


> There's also another issue with iopa that isn't obvious at first look:
> It's racy vs. page tables being disposed on SMP machines

Considering it was done before any SMP support,
and was ignored when support was added, that's
not really an argument to not use it but rather to fix it.

> ....   though just saying "just
> sucks" is neither useful nor constructive.

About in line  with "I don't like it" :-)

> .....  If you think that some
> aspects of linux kernel memory handling should be done differently,  
> you
> are much welcome to propose alternatives

They have always been ignored, and never
accepted as small changes over time.  It seems
to be an all or nothing approach that I just
don't have the time to invest.

> Now, I don't completely agree with you that there are "fundamental"
> limitations in the way memory is managed.

Sure there are, but it's not for discussion here.

> ...  First let's get off the
> subject of "VM"

It's all about VM and the implicit connection Linux
makes between physical memory and virtual
addresses that makes this a problem.  There are
special allocators for the different types of "memory",
different ways of setting/finding any attributes (if
you can at all), and the pre-knowledge you need
about the address spaces so you can call proper
support functions.  There is no separation of
VM objects and what backs them, orthogonal
operations (to do something as simple as get
a physical address behind a virtual one regardless
of the backing store), the ridiculous need for something
like highmem and the yet another way to manage
that, the inability to have a separate kernel and
user VM space if I choose, the minimal support and
horrible hacks for 32-bit systems with greater than
32-bit physical addresses, the list goes on and on.....


> ....  as this is commonly used to represent the memory
> management of user processes which isn't what we are talking about  
> (and
> doesnt' suffer from any of the "limitations" you mention anyway.
>
> What we are talking about here is the management of the kernel memory
> address space.

I see.....  I now understand.....

Thanks.

	-- Dan

  reply	other threads:[~2007-02-10 22:27 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 11:31 [PATCH 1/4] ucc_geth: Change private immrbar_virt_to_phys to generic iopa Li Yang
2007-02-06 14:26 ` Kumar Gala
2007-02-07  9:34   ` Li Yang-r58472
2007-02-07 16:36     ` Kumar Gala
2007-02-07 16:43   ` Timur Tabi
2007-02-07 16:49     ` Kumar Gala
2007-02-07 17:03       ` Timur Tabi
2007-02-08  5:52         ` Li Yang-r58472
2007-02-08  5:57           ` Kumar Gala
2007-02-08  6:48             ` Li Yang-r58472
2007-02-08  6:53               ` Kumar Gala
2007-02-08  7:06                 ` Li Yang-r58472
2007-02-08  7:16                   ` Kumar Gala
2007-02-08  7:36                     ` Li Yang-r58472
2007-02-08  7:41                       ` Kumar Gala
2007-02-08  9:22                         ` Discussion about iopa() Li Yang-r58472
2007-02-08 13:41                           ` Timur Tabi
2007-02-09 17:08                             ` Dan Malek
2007-02-10  2:37                               ` Benjamin Herrenschmidt
2007-02-10 18:04                                 ` Dan Malek
2007-02-10 21:40                                   ` Benjamin Herrenschmidt
2007-02-10 22:27                                     ` Dan Malek [this message]
2007-02-10 22:42                                       ` Benjamin Herrenschmidt
2007-02-08 21:26                           ` Benjamin Herrenschmidt
2007-02-09 17:13                             ` Dan Malek
2007-02-09 22:06                               ` Benjamin Herrenschmidt
2007-02-09 22:46                                 ` Kumar Gala
2007-02-09 22:51                                   ` Timur Tabi
2007-02-09 23:06                                     ` Kumar Gala
2007-02-09 23:10                                       ` Timur Tabi
2007-02-09 23:19                                         ` Benjamin Herrenschmidt
2007-02-09 23:22                                         ` Kumar Gala
2007-02-09 23:33                                           ` Timur Tabi
2007-02-09 23:43                                             ` Kumar Gala
2007-02-09 17:06                           ` Dan Malek
2007-02-08 13:35                 ` [PATCH 1/4] ucc_geth: Change private immrbar_virt_to_phys to generic iopa Timur Tabi
2007-02-09 17:22                   ` Dan Malek
2007-02-09 17:26                     ` Timur Tabi
2007-02-08 13:27           ` Timur Tabi
2007-02-07  0:19 ` Jeff Garzik

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=8D2A12A2-EB11-497C-AF4C-FDD95088E968@embeddedalley.com \
    --to=dan@embeddedalley.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=timur@freescale.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;
as well as URLs for NNTP newsgroup(s).