The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Magnus Damm" <magnus.damm@gmail.com>
Cc: fastboot@lists.osdl.org, linux-kernel@vger.kernel.org,
	"Magnus Damm" <magnus@valinux.co.jp>
Subject: Re: [Fastboot] Re: [PATCH] Kexec: Remove order
Date: Thu, 13 Apr 2006 04:01:37 -0600	[thread overview]
Message-ID: <m1wtdt6bge.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <aec7e5c30604122321p2bedb370l945009ccdb725bac@mail.gmail.com> (Magnus Damm's message of "Thu, 13 Apr 2006 15:21:51 +0900")

"Magnus Damm" <magnus.damm@gmail.com> writes:

> On 4/13/06, Eric W. Biederman <ebiederm@xmission.com> wrote:

>> Feel free to fix x86_64, to use only page sized allocates.
>
> I will. But first - questions:
>
> Should KEXEC_CONTROL_CODE_SIZE be left in even if it's always 4096?

So far I don't see a compelling case to remove it.  To a certain
extent I am happily surprised to see that everyone's code
across several architectures has managed to fit in 4KB.

> Do you like how I added image->arch_private?

At a quick glance I couldn't make sense of the interactions.
So I totally missed that.

So you actually did 3 things at once. That makes a very hard
to digest patch.

>> Until I see a reasonable argument that none of the architectures
>> currently supported by the linux kernel would need a multi order
>> allocation for a kexec port am I interested in removing support.
>
> I argue that it is quite pointless to have code to support N-order
> allocations that no one is using. Especially since the code is more
> complex and it may be harder for the buddy allocator to fulfill
> N-order allocations compared to 0-order allocations.

The complexity as your patch shows is currently is 2 for loops.
Refactoring the entire code base to save 2 for loops when
using N-order allocations are totally voluntary is over kill.

Most of the complexity in the code actually comes from having
to use 0-order allocations.

> And on top of the reasons above I'd like to stay away from N-order
> allocations because Xen doesn't guarantee that (pseudo-)physical pages
> handled out by the buddy allocator are contiguous.

Yes. Xen doesn't have enough sense to use 4MB pages so kernels can
execute efficiently.  That may be overly harsh.  But given the
efficiency that you can get from using large pages in the kernel
not guaranteeing large page allocations seems quite foolish.

>> As I recall the alpha had an architectural need for a 32KB
>> allocation or something like that.
>
> Oh. So if someone is working on kexec for alpha I guess we need
> N-order allocations, right?

To be clear.  Until some one shows me that on no architecture
that the linux kernel supports there are no data structures
that the cpus use directly that exceed 1 page there is the potential
to need > 0 order allocations.

My investigation into the basic problem says the are occasions
when order-N allocations are needed.

I am overjoyed that currently there are multiple architectures
supported by kexec but the porting work has yet to slow
down as your Xen work shows.

kexec currently does not have the volume of development and the number
of people who understand it to handle being refactored very often.
For preparation phase we are likely ok.  For later when it gets into
very tricky arch specific assembly things are much worse.  Unless the
basic skeleton gets it the way please use what is provided has been 
debugged.

Eric

  reply	other threads:[~2006-04-13 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13  2:59 [PATCH] Kexec: Remove order Magnus Damm
2006-04-13  4:18 ` Eric W. Biederman
2006-04-13  6:21   ` [Fastboot] " Magnus Damm
2006-04-13 10:01     ` Eric W. Biederman [this message]
2006-04-14  0:57       ` Magnus Damm
2006-04-13 19:53   ` Christoph Lameter
2006-04-14  1:01     ` Magnus Damm

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=m1wtdt6bge.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=fastboot@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=magnus@valinux.co.jp \
    /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