Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685777 > unrolled thread

Re: [PATCH v5 2/4] sched/deadline: Change return value of cpudl_find()

Started byJuri Lelli <juri.lelli@arm.com>
First post2017-07-12 15:30 +0200
Last post2017-07-13 03:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 2/4] sched/deadline: Change return value of  cpudl_find() Juri Lelli <juri.lelli@arm.com> - 2017-07-12 15:30 +0200
    Re: [PATCH v5 2/4] sched/deadline: Change return value of  cpudl_find() Byungchul Park <byungchul.park@lge.com> - 2017-07-13 03:30 +0200

#1685777 — Re: [PATCH v5 2/4] sched/deadline: Change return value of cpudl_find()

FromJuri Lelli <juri.lelli@arm.com>
Date2017-07-12 15:30 +0200
SubjectRe: [PATCH v5 2/4] sched/deadline: Change return value of cpudl_find()
Message-ID<u2pSj-ja-29@gated-at.bofh.it>
Hi,

On 23/05/17 11:00, Byungchul Park wrote:
> Currently cpudl_find() returns the best cpu that means it has the
> maximum dl, however, the value is already kept in later_mask and the
> return value is not referred directly any more.
> 
> Now, it's enough to return whether CPUs were found or not, like rt.
> 

I'd reword as

cpudl_find() users are only interested in knowing if suitable CPU(s)
were found or not (and then they look at later_mask to know which).

Change cpudl_find() return type accordingly.

> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>  kernel/sched/cpudeadline.c | 26 +++++++++++++-------------
>  kernel/sched/deadline.c    |  6 +++---
>  2 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
> index fba235c..7408cbe 100644
> --- a/kernel/sched/cpudeadline.c
> +++ b/kernel/sched/cpudeadline.c
> @@ -119,29 +119,29 @@ static inline int cpudl_maximum(struct cpudl *cp)
>   * @p: the task
>   * @later_mask: a mask to fill in with the selected CPUs (or NULL)
>   *
> - * Returns: int - best CPU (heap maximum if suitable)
> + * Returns: (int)bool - CPUs were found

Why not simply bool?

Thanks,

- Juri

[toc] | [next] | [standalone]


#1686168

FromByungchul Park <byungchul.park@lge.com>
Date2017-07-13 03:30 +0200
Message-ID<u2B73-7qj-7@gated-at.bofh.it>
In reply to#1685777
On Wed, Jul 12, 2017 at 02:22:32PM +0100, Juri Lelli wrote:
> Hi,
> 
> On 23/05/17 11:00, Byungchul Park wrote:
> > Currently cpudl_find() returns the best cpu that means it has the
> > maximum dl, however, the value is already kept in later_mask and the
> > return value is not referred directly any more.
> > 
> > Now, it's enough to return whether CPUs were found or not, like rt.
> > 
> 
> I'd reword as
> 
> cpudl_find() users are only interested in knowing if suitable CPU(s)
> were found or not (and then they look at later_mask to know which).
> 
> Change cpudl_find() return type accordingly.

Hi,

Much better. Thank you very much. I will change it.

> 
> > Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> > ---
> >  kernel/sched/cpudeadline.c | 26 +++++++++++++-------------
> >  kernel/sched/deadline.c    |  6 +++---
> >  2 files changed, 16 insertions(+), 16 deletions(-)
> > 
> > diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
> > index fba235c..7408cbe 100644
> > --- a/kernel/sched/cpudeadline.c
> > +++ b/kernel/sched/cpudeadline.c
> > @@ -119,29 +119,29 @@ static inline int cpudl_maximum(struct cpudl *cp)
> >   * @p: the task
> >   * @later_mask: a mask to fill in with the selected CPUs (or NULL)
> >   *
> > - * Returns: int - best CPU (heap maximum if suitable)
> > + * Returns: (int)bool - CPUs were found
> 
> Why not simply bool?

I just did it same as rt.

> Thanks,
> 
> - Juri

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web