[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080717150916.bf0ca765.pj@sgi.com>
Date: Thu, 17 Jul 2008 15:09:16 -0500
From: Paul Jackson <pj@....com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: seto.hidetoshi@...fujitsu.com, linux-kernel@...r.kernel.org,
menage@...gle.com, peterz@...radead.org, akpm@...ux-foundation.org,
laijs@...fujitsu.com
Subject: Re: [RFC] [PATCH] cpuset: fix wrong calculation of relax domain
level
In looking at this, I notice something I should have questioned before.
The include/linux/sched.h code:
struct sched_domain_attr {
int relax_domain_level;
};
#define SD_ATTR_INIT (struct sched_domain_attr) { \
.relax_domain_level = -1, \
}
and the associated passing of relax_domain_level's embedded inside
a kmalloc'c struct sched_domain_attr 'dattr' seems like excessive
obfuscating apparatus to me. Unless someone has short term plans
to be adding some other attributes to this sched_domain_attr, I
suspect it would make more sense just to pass relax_domain_level's
as explicit lvalues, dropping all this attr stuff.
Adding unnecessary abstractions 'for future growth' is usually a
bad idea. It impedes current code understanding more than it aids
future code growth.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@....com> 1.940.382.4214
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists