All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org,
	"Stanislaw Gruszka" <sgruszka@redhat.com>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Spencer Candland" <spencer@bluehost.com>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Balbir Singh" <balbir@in.ibm.com>,
	"Américo Wang" <xiyou.wangcong@gmail.com>
Subject: Re: [PATCH -tip 3/3] define nsecs_to_jiffies()
Date: Thu, 26 Nov 2009 11:27:06 +0100	[thread overview]
Message-ID: <1259231226.4273.29.camel@twins> (raw)
In-Reply-To: <4B0E16E7.5070307@jp.fujitsu.com>

On Thu, 2009-11-26 at 14:49 +0900, Hidetoshi Seto wrote:
> Use of msecs_to_jiffies() for nsecs_to_cputime() have some problems:
> 
>  - The type of msecs_to_jiffies()'s argument is unsigned int, so
>    it cannot convert msecs greater than UINT_MAX = about 49.7 days.
>  - msecs_to_jiffies() returns MAX_JIFFY_OFFSET if MSB of argument
>    is set, assuming that input was negative value.  So it cannot
>    convert msecs greater than INT_MAX = about 24.8 days too.
> 
> This patch defines a new function nsecs_to_jiffies() that can deal
> greater values, and that can deal all incoming values as unsigned.

This looks good too,

Thanks Hidetoshi-san!

  reply	other threads:[~2009-11-26 10:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20  4:44 [PATCH tip/sched/core] introduce task_times() to replace task_[us]time() pair Hidetoshi Seto
2009-11-23 10:28 ` Stanislaw Gruszka
2009-11-24  5:38   ` Hidetoshi Seto
2009-11-24  7:08     ` Hidetoshi Seto
2009-11-26  5:48       ` [PATCH -tip 1/3] introduce task_times() to replace task_{u,s}time() pair Hidetoshi Seto
2009-11-26 10:25         ` Peter Zijlstra
2009-11-27  0:37           ` Hidetoshi Seto
2009-11-26 12:33         ` [tip:sched/core] sched: Introduce " tip-bot for Hidetoshi Seto
2009-11-26  5:49       ` [PATCH -tip 2/3] remove task_{u,s,g}time() Hidetoshi Seto
2009-11-26 10:26         ` Peter Zijlstra
2009-11-26 12:33         ` [tip:sched/core] sched: Remove task_{u,s,g}time() tip-bot for Hidetoshi Seto
2009-11-26  5:49       ` [PATCH -tip 3/3] define nsecs_to_jiffies() Hidetoshi Seto
2009-11-26 10:27         ` Peter Zijlstra [this message]
2009-11-26 12:34         ` [tip:sched/core] sched, time: Define nsecs_to_jiffies() tip-bot for 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=1259231226.4273.29.camel@twins \
    --to=peterz@infradead.org \
    --cc=balbir@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=sgruszka@redhat.com \
    --cc=spencer@bluehost.com \
    --cc=xiyou.wangcong@gmail.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 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.