public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: seto.hidetoshi@jp.fujitsu.com, linux-kernel@vger.kernel.org,
	menage@google.com, peterz@infradead.org,
	akpm@linux-foundation.org, laijs@cn.fujitsu.com
Subject: Re: [RFC] [PATCH] cpuset: fix wrong calculation of relax domain level
Date: Thu, 17 Jul 2008 15:09:16 -0500	[thread overview]
Message-ID: <20080717150916.bf0ca765.pj@sgi.com> (raw)
In-Reply-To: <487F1B38.3050100@cn.fujitsu.com>

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@sgi.com> 1.940.382.4214

  reply	other threads:[~2008-07-17 20:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17  8:07 [RFC] [PATCH] cpuset: fix wrong calculation of relax domain level Li Zefan
2008-07-17  8:57 ` Hidetoshi Seto
2008-07-17 10:13   ` Li Zefan
2008-07-17 20:09     ` Paul Jackson [this message]
2008-07-17 20:28 ` Paul Jackson
2008-07-18  0:26   ` Hidetoshi Seto
2008-07-18  0:35     ` Paul Jackson
2008-07-18  2:36   ` Li Zefan
2008-07-18  2:43     ` Paul Jackson

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=20080717150916.bf0ca765.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=peterz@infradead.org \
    --cc=seto.hidetoshi@jp.fujitsu.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