mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: vincent.guittot@linaro.org
Cc: bsegall@google.com, dietmar.eggemann@arm.com,
	juri.lelli@redhat.com, kprateek.nayak@amd.com,
	linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com,
	peterz@infradead.org, rostedt@goodmis.org, vschneid@redhat.com,
	Kayra Cizmeci <kayracizmeci@gmail.com>
Subject: Re: [PATCH] sched/eevdf: fix rb augmented with multi fields
Date: Wed,  9 Sep 2026 21:58:27 +0300	[thread overview]
Message-ID: <20260909185828.1158142-1-kayracizmeci@gmail.com> (raw)
In-Reply-To: <20260908135526.2783039-1-vincent.guittot@linaro.org>

Hello Vincent,

> The eevdf rb tree maintains 3 augmented fields but only one is currently
> copied when balancing the tree.

> Add a more generic define that can be used when there are several augmented
> fields. In this case, we provide a function that takes care of copying all
> fields.

So the problem is we need to copy 3 things and we copy 1 thing currently? (simplified)
Also, I read Prateek's review too, so I'll not go on the same things on this one.

And I thought that 2 separate reviews are better than one, so... :>

> /*
> - * Template for declaring augmented rbtree callbacks (generic case)
> + * Template for declaring augmented rbtree callbacks (generic multi fields)
>   *
>   * RBSTATIC:    'static' or empty
>   * RBNAME:      name of the rb_augment_callbacks structure
>   * RBSTRUCT:    struct type of the tree nodes
>   * RBFIELD:     name of struct rb_node field within RBSTRUCT
> - * RBAUGMENTED: name of field within RBSTRUCT holding data for subtree
> - * RBCOMPUTE:   name of function that recomputes the RBAUGMENTED data
> + * RBCOPY:	name of function that copies the RBAUGMENTED datas
> + * RBCOMPUTE:   name of function that recomputes the RBAUGMENTED datas
>  */

nit. 'datas' is wrong in english. I would use it like that too. Maybe 'fields' but
I think using 'fields' in one of them and 'data' in the others would look bad. 
Ah. English is annoying.

> @@ -114,14 +114,14 @@ RBNAME ## _copy(struct rb_node *rb_old, struct rb_node *rb_new)		\
>  {									\
>  	RBSTRUCT *old = rb_entry(rb_old, RBSTRUCT, RBFIELD);		\
>  	RBSTRUCT *new = rb_entry(rb_new, RBSTRUCT, RBFIELD);		\
> -	new->RBAUGMENTED = old->RBAUGMENTED;				\
> +	RBCOPY(new, old);						\
>  }									\
>  static void								\
>  RBNAME ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new)	\
>  {									\
>  	RBSTRUCT *old = rb_entry(rb_old, RBSTRUCT, RBFIELD);		\
>  	RBSTRUCT *new = rb_entry(rb_new, RBSTRUCT, RBFIELD);		\
> -	new->RBAUGMENTED = old->RBAUGMENTED;				\
> +	RBCOPY(new, old);						\
>  	RBCOMPUTE(old, false);						\
>  }

The bool exit on min_vruntime_update() parameter appears to be unused when I grep or search for
any use case. Could we remove it?

The other things aside these is good for me. It looks really weird to copy only
min_vruntime while not copying others at the first place. And I think the
solution is good. 

I was thinking to do a boot test, but I did not thought it would add something
to the patch. So I did not. I can if it's going to add something tho.

Include if you want to :-):

Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com>


  parent reply	other threads:[~2026-09-09 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 13:55 Vincent Guittot
2026-09-08 20:37 ` K Prateek Nayak
2026-09-09 13:20   ` Vincent Guittot
2026-09-09 18:58 ` Kayra Cizmeci [this message]
2026-09-09 21:58   ` Peter Zijlstra
2026-09-10  5:59     ` Kayra Cizmeci

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=20260909185828.1158142-1-kayracizmeci@gmail.com \
    --to=kayracizmeci@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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

all inboxes | Powered by JetHome®