lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 10/60] sched: Use parent_entity() in more places
Date
Replace open-coded cases of parent_entity() with actual parent_entity()
invocations.

This will make later checks within parent_entity() more useful.

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index bccd7a66858e..5d6225aedbfe 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -263,7 +263,7 @@ static inline struct task_struct *task_of(struct sched_entity *se)

/* Walk up scheduling entities hierarchy */
#define for_each_sched_entity(se) \
- for (; se; se = se->parent)
+ for (; se; se = parent_entity(se))

static inline struct cfs_rq *task_cfs_rq(struct task_struct *p)
{
@@ -9653,7 +9653,7 @@ static void propagate_entity_cfs_rq(struct sched_entity *se)
struct cfs_rq *cfs_rq;

/* Start to propagate at parent */
- se = se->parent;
+ se = parent_entity(se);

for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se);
--
2.9.3.1.gcba166c.dirty
\
 
 \ /
  Last update: 2018-09-07 23:47    [W:0.493 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site