linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	aaditya.kumar.30@gmail.com, kamezawa.hiroyu@jp.fujitsu.com,
	linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
	Yinghai Lu <yinghai@kernel.org>
Subject: Re: + memory-hotplug-fix-kswapd-looping-forever-problem-fix-fix.patch added to -mm tree
Date: Mon, 23 Jul 2012 08:42:47 -0700	[thread overview]
Message-ID: <20120723154247.GE6823@google.com> (raw)
In-Reply-To: <20120723045855.GC6832@bbox>

Hello, Minchan.

On Mon, Jul 23, 2012 at 01:58:55PM +0900, Minchan Kim wrote:
> I would like to know what fields you are concerning because most of field

The above question itself is a problem.  It's subtle to hell.  Some
fields of this data structure is used during early boot but at some
point all are reset to zero, so we have to be careful about how those
fields are used before and after.

This might seem clear now but things like this are likely to make
people later working on the code go WTF.  Let's say for whatever
reason ->bdata needs to be accessed after free_area_init - e.g.
arch_add_memory() needs some info from bdata, what then?

What if we end up having to add a new property field which is
determined by platform code but used by generic code.  I would add a
field to pgdat, init it from numa.c and then later use it in generic
code.  If the field gets zeroed inbetween, I would get pretty annoyed.

I really don't think this subject is worth the amount of discussion we
had in this thread.  Just make the archs clear the data structure on
creation.  Anything else is silly.

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-07-23 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120717233115.A8E411E005C@wpzn4.hot.corp.google.com>
2012-07-18  1:22 ` + memory-hotplug-fix-kswapd-looping-forever-problem-fix-fix.patch added to -mm tree Minchan Kim
2012-07-18 21:38   ` Andrew Morton
2012-07-19  0:10     ` Minchan Kim
2012-07-19  0:21       ` Tejun Heo
2012-07-19  0:48         ` Minchan Kim
2012-07-19 16:57           ` Tejun Heo
2012-07-19 23:50             ` Minchan Kim
2012-07-20 17:15               ` Tejun Heo
2012-07-20 21:22               ` Andrew Morton
2012-07-20 21:36                 ` Tejun Heo
2012-07-23  4:58                   ` Minchan Kim
2012-07-23 15:42                     ` Tejun Heo [this message]
2012-07-24  1:11                       ` Minchan Kim

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=20120723154247.GE6823@google.com \
    --to=tj@kernel.org \
    --cc=aaditya.kumar.30@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ralf@linux-mips.org \
    --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 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).