From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
mingo@elte.hu, Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: introduce bootmem_state
Date: Fri, 06 Mar 2009 16:10:23 -0800 [thread overview]
Message-ID: <49B1BB6F.2080800@goop.org> (raw)
In-Reply-To: <49B1B2E9.5050507@zytor.com>
H. Peter Anvin wrote:
> Jeremy Fitzhardinge wrote:
>>
>> Please, no. system_state should be deprecated; its hard enough to
>> have a notion of some kind of system-wide state, but putting
>> subsystem specific substates into it just makes things worse.
>>
>
> Does it? It seems to me to have a bunch of state variables which can
> interact in $DEITY knows how many ways sounds like a bad idea.
If each state variable describes the state of a single subsystem in a
well-defined way then it is meaningful and fairly easy to understand; I
would love to have a straightforward way to query which allocator is
safe to use at a given moment.
The total number of states is always going to be subsys1 * subsys2 *
..., but folding them all into one state variable only makes sense if we
have a well-defined set of states *and* transitions between them. But
even then it implies that we have enough coupling between our subsystems
that we would even care what their aggregate state is, which is already
a bad idea. If we keep the internal workings of our subsystems as
internal details, then having private state variables is the way to go.
The real problem with system_state is that it has a few broadly-defined
values, but no real explanation of what they mean, so they end up
getting used in inappropriate ways (like the virt_addr_valid() thing I
fixed yesterday).
J
next prev parent reply other threads:[~2009-03-07 0:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 12:54 [PATCH 07/17] x86: rename after_init_bootmem to after_bootmem in mm/init_32.c Pekka Enberg
2009-03-05 13:37 ` [tip:x86/mm] " Pekka Enberg
2009-03-05 19:14 ` [PATCH 07/17] " Yinghai Lu
[not found] ` <49B02C68.1030203@cs.helsinki.fi>
2009-03-05 23:45 ` [PATCH] x86: introduce bootmem_state Yinghai Lu
2009-03-06 6:14 ` H. Peter Anvin
2009-03-06 6:38 ` Yinghai Lu
2009-03-06 22:12 ` Jeremy Fitzhardinge
2009-03-06 23:34 ` H. Peter Anvin
2009-03-07 0:01 ` Andrew Morton
2009-03-07 0:10 ` Jeremy Fitzhardinge [this message]
2009-03-07 0:11 ` H. Peter Anvin
2009-03-06 14:59 ` Ingo Molnar
2009-03-06 18:20 ` Yinghai Lu
2009-03-06 18:38 ` [PATCH] x86: introduce bootmem_state -v2 Yinghai Lu
2009-03-06 19:12 ` Ingo Molnar
2009-03-06 19:30 ` Andrew Morton
2009-03-06 19:36 ` Ingo Molnar
2009-03-06 22:06 ` Jeremy Fitzhardinge
2009-03-06 19:50 ` Yinghai Lu
2009-03-06 20:15 ` Ingo Molnar
2009-03-06 20:40 ` Yinghai Lu
2009-03-06 21:35 ` Ingo Molnar
2009-03-07 0:49 ` [PATCH] x86: introduce bootmem_state -v3 Yinghai Lu
2009-03-08 18:54 ` [tip:kmemcheck] x86: introduce bootmem_state Yinghai Lu
2009-03-08 18:58 ` Ingo Molnar
2009-03-08 19:30 ` Yinghai Lu
2009-03-08 20:32 ` Ingo Molnar
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=49B1BB6F.2080800@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@cs.helsinki.fi \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.