public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Menage <menage@google.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Paul Jackson <pj@sgi.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix cpuset sched_relax_domain_level control file
Date: Wed, 07 May 2008 09:46:13 +0800	[thread overview]
Message-ID: <482109E5.5050204@cn.fujitsu.com> (raw)
In-Reply-To: <20080506183841.e1771032.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Tue, 06 May 2008 18:08:17 -0700 Paul Menage <menage@google.com> wrote:
> 
>> -static int update_relax_domain_level(struct cpuset *cs, char *buf)
>> +static int update_relax_domain_level(struct cpuset *cs, s64 val)
>>  {
>> -	int val = simple_strtol(buf, NULL, 10);
>> -
>> -	if (val < 0)
>> +	if ((int)val < 0)
>>  		val = -1;
>>  
> 
> Are you sure about the typecast here?  If `val' has a value of say
> 0x0000_ffff_ffff_ffff then I assume the casted value will be negative, only
> it wasn't?
> 

I saw this, but I think it's ok.

  -1  : no request. use system default or follow request of others.
   0  : no search.
  ...
 ( 5~ : search system wide [on NUMA system])

Or maybe we can restrict the value from -1 to 5 ?

  parent reply	other threads:[~2008-05-07  1:47 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  1:08 [PATCH] Fix cpuset sched_relax_domain_level control file Paul Menage
2008-05-07  1:21 ` Li Zefan
2008-05-07  1:31 ` Andrew Morton
2008-05-07  1:40   ` Paul Jackson
2008-05-07  3:38     ` Reverting per-cpuset "system" (IRQ affinity) patch (was: Fix cpuset sched_relax_domain_level control file) Paul Jackson
2008-05-07  3:44       ` Andrew Morton
2008-05-07  3:52         ` Paul Jackson
2008-05-07  6:44           ` Peter Zijlstra
2008-05-08 17:56             ` Reverting per-cpuset "system" (IRQ affinity) patch Max Krasnyansky
2008-05-09 10:22               ` Ingo Molnar
2008-05-09 11:26                 ` Paul Jackson
2008-05-21  0:46                   ` Max Krasnyanskiy
2008-05-07  1:38 ` [PATCH] Fix cpuset sched_relax_domain_level control file Andrew Morton
2008-05-07  1:41   ` Paul Menage
2008-05-07  9:48     ` Adrian Bunk
2008-05-07 15:08       ` Andrew Morton
2008-05-07  1:46   ` Li Zefan [this message]
2008-05-07  1:49     ` Paul Jackson
2008-05-07  1:51       ` Paul Menage
2008-05-07  1:58         ` Paul Jackson
2008-05-07  2:08           ` Andrew Morton
2008-05-07  2:11             ` Paul Jackson
2008-05-07  2:15               ` Paul Menage
2008-05-07  2:28                 ` Andrew Morton
2008-05-07  2:32                 ` Paul Jackson
2008-05-07  2:12           ` Li Zefan
2008-05-07  2:17             ` Paul Jackson
2008-05-07  2:27             ` Hidetoshi Seto

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=482109E5.5050204@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.com \
    --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