public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Turner <pjt@google.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] sched: use jump labels to reduce overhead when bandwidth control is inactive
Date: Thu, 10 Nov 2011 20:23:14 -0800	[thread overview]
Message-ID: <j9i7vi$qis$1@dough.gmane.org> (raw)
In-Reply-To: <1320744563.2244.8.camel@twins>

On 11/08/2011 01:29 AM, Peter Zijlstra wrote:
> On Mon, 2011-11-07 at 20:26 -0800, Paul Turner wrote:
>> @@ -1788,6 +1791,9 @@ static void do_sched_cfs_slack_timer(str
>>    */
>>   static void check_enqueue_throttle(struct cfs_rq *cfs_rq)
>>   {
>> +       if (!cfs_bandwidth_used())
>> +               return;
>> +
>>          /* an active group must be handled by the update_curr()->put() path */
>>          if (!cfs_rq->runtime_enabled || cfs_rq->curr)
>>                  return;
>> @@ -1805,6 +1811,9 @@ static void check_enqueue_throttle(struc
>>   /* conditionally throttle active cfs_rq's from put_prev_entity() */
>>   static void check_cfs_rq_runtime(struct cfs_rq *cfs_rq)
>>   {
>> +       if (!cfs_bandwidth_used())
>> +               return;
>> +
>>          if (likely(!cfs_rq->runtime_enabled || cfs_rq->runtime_remaining>  0))
>>                  return;
>>
>
> does it matter if you pull this out into an inline function like:
>
> static __always_inline void check_enqueue_throttle(struct cfs_rq *cfs_rq)
> {
> 	if (cfs_bandwidth_used())
> 		__check_enqueue_throttle(cfs_rq);
> }
>
> That would avoid the superfluous function call as well.

This this is the only call-site it's being inlined already so there's no 
difference atm.  That said, check_enqueue_throttle is sufficiently small we 
could just add __always_inline to force this to be the default behavior and 
avoid any surprises from this in the future.

Let me know if you'd like me to re-post with this added.

- Paul


  reply	other threads:[~2011-11-11  4:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08  4:26 [patch 0/3] sched: bandwidth-control tweaks for v3.2 Paul Turner
2011-11-08  4:26 ` [patch 1/3] sched: use jump labels to reduce overhead when bandwidth control is inactive Paul Turner
2011-11-08  9:26   ` Peter Zijlstra
2011-11-08  9:28   ` Peter Zijlstra
2011-11-08  9:29   ` Peter Zijlstra
2011-11-11  4:23     ` Paul Turner [this message]
2011-11-18 23:42   ` [tip:sched/core] sched: Use " tip-bot for Paul Turner
2011-11-08  4:26 ` [patch 2/3] sched: fix buglet in return_cfs_rq_runtime() Paul Turner
2011-11-18 23:41   ` [tip:sched/core] sched: Fix " tip-bot for Paul Turner
2011-11-08  4:26 ` [patch 3/3] From: Ben Segall <bsegall@google.com> Paul Turner
2011-11-10  2:28   ` Paul Turner
2011-11-10  2:30   ` Paul Turner
2011-11-14 10:03     ` Kamalesh Babulal
2011-11-14 12:01     ` Peter Zijlstra
2011-11-15 21:14       ` Benjamin Segall

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='j9i7vi$qis$1@dough.gmane.org' \
    --to=pjt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    /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