Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-12 Thread Muchun Song
Hi Peter, Ingo Molnar 于2018年11月12日周一 下午2:57写道: > > > * Peter Zijlstra wrote: > > > I think you only need the less thing, because: > > > > static inline bool prio_lower(int a, int b) > > { > > return a > b; > > } > > I'd say that should be named rt_prio_lower(), even if it's local to >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-12 Thread Muchun Song
Hi Peter, Ingo Molnar 于2018年11月12日周一 下午2:57写道: > > > * Peter Zijlstra wrote: > > > I think you only need the less thing, because: > > > > static inline bool prio_lower(int a, int b) > > { > > return a > b; > > } > > I'd say that should be named rt_prio_lower(), even if it's local to >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-11 Thread Ingo Molnar
* Peter Zijlstra wrote: > I think you only need the less thing, because: > > static inline bool prio_lower(int a, int b) > { > return a > b; > } I'd say that should be named rt_prio_lower(), even if it's local to sched/rt.c, right? Thanks, Ingo

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-11 Thread Ingo Molnar
* Peter Zijlstra wrote: > I think you only need the less thing, because: > > static inline bool prio_lower(int a, int b) > { > return a > b; > } I'd say that should be named rt_prio_lower(), even if it's local to sched/rt.c, right? Thanks, Ingo

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-08 Thread Peter Zijlstra
On Thu, Nov 08, 2018 at 10:15:49AM +0800, Muchun Song wrote: > Peter Zijlstra 于2018年11月8日周四 上午1:31写道: > > I think you only need the less thing, because: > > > > static inline bool prio_lower(int a, int b) > > { > > return a > b; > > } > > > > prio_higher(a,b) := prio_lower(b,a) > >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-08 Thread Peter Zijlstra
On Thu, Nov 08, 2018 at 10:15:49AM +0800, Muchun Song wrote: > Peter Zijlstra 于2018年11月8日周四 上午1:31写道: > > I think you only need the less thing, because: > > > > static inline bool prio_lower(int a, int b) > > { > > return a > b; > > } > > > > prio_higher(a,b) := prio_lower(b,a) > >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Muchun Song
Hi Peter, Thanks for your review. Peter Zijlstra 于2018年11月8日周四 上午1:31写道: > > On Thu, Nov 08, 2018 at 12:15:05AM +0800, Muchun Song wrote: > > We use a value to represent the priority of the RT task. But a smaller > > value corresponds to a higher priority. If there are two RT task A and B, > >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Muchun Song
Hi Peter, Thanks for your review. Peter Zijlstra 于2018年11月8日周四 上午1:31写道: > > On Thu, Nov 08, 2018 at 12:15:05AM +0800, Muchun Song wrote: > > We use a value to represent the priority of the RT task. But a smaller > > value corresponds to a higher priority. If there are two RT task A and B, > >

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Peter Zijlstra
On Thu, Nov 08, 2018 at 12:15:05AM +0800, Muchun Song wrote: > We use a value to represent the priority of the RT task. But a smaller > value corresponds to a higher priority. If there are two RT task A and B, > their priorities are prio_a and prio_b, respectively. If prio_a is larger > than

Re: [PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Peter Zijlstra
On Thu, Nov 08, 2018 at 12:15:05AM +0800, Muchun Song wrote: > We use a value to represent the priority of the RT task. But a smaller > value corresponds to a higher priority. If there are two RT task A and B, > their priorities are prio_a and prio_b, respectively. If prio_a is larger > than

[PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Muchun Song
We use a value to represent the priority of the RT task. But a smaller value corresponds to a higher priority. If there are two RT task A and B, their priorities are prio_a and prio_b, respectively. If prio_a is larger than prio_b, which means that the priority of RT task A is lower than RT task

[PATCH] sched/rt: Introduce prio_{higher,lower}() helper for comparing RT task prority

2018-11-07 Thread Muchun Song
We use a value to represent the priority of the RT task. But a smaller value corresponds to a higher priority. If there are two RT task A and B, their priorities are prio_a and prio_b, respectively. If prio_a is larger than prio_b, which means that the priority of RT task A is lower than RT task