All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Prakash Sangappa <prakash.sangappa@oracle.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"manfred@colorfullife.com" <manfred@colorfullife.com>
Subject: Re: [PATCH v3] ipc: Update semtimedop() to use hrtimer
Date: Fri, 29 Apr 2022 00:41:03 +0200	[thread overview]
Message-ID: <87tuacomps.ffs@tglx> (raw)
In-Reply-To: <5FEE7AB6-7560-4998-A7A3-B60A4B32E1DE@oracle.com>

On Thu, Apr 28 2022 at 22:23, Prakash Sangappa wrote:
>> On Apr 28, 2022, at 3:02 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
>> On Thu, Apr 28 2022 at 13:50, Davidlohr Bueso wrote:
>>> On Thu, 28 Apr 2022, Prakash Sangappa wrote:
>>>> -		if (timeout)
>>>> -			jiffies_left = schedule_timeout(jiffies_left);
>>>> -		else
>>>> -			schedule();
>>>> +		timed_out = !schedule_hrtimeout_range(exp,
>>>> +				current->timer_slack_ns, HRTIMER_MODE_ABS);
>>> 
>>> I'm wondering if the slack parameter instead of passing the timer_slack_ns
>>> value immediately, we should do a rt_task() check and pass zero if so.
>> 
>> We should have a wrapper function which takes care of that instead of
>> having checks all over the place.
>
> Ok  it can be an inline function in sched.h which returns appropriate 
> slack time. Use that in  futex_wait() and sigtimedwait() also in addition to 
> semtimedop() & mqueue codepath?

No. What I meant is a function which handles this internally, not an inline
function which has to be invoked on various call sites.

> Should that be a separate patch?

Definitely. That's an orthogonal problem.

Thanks,

        tglx

  reply	other threads:[~2022-04-28 22:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 20:46 [PATCH v3] ipc: Update semtimedop() to use hrtimer Prakash Sangappa
2022-04-28 20:50 ` Davidlohr Bueso
2022-04-28 22:02   ` Thomas Gleixner
2022-04-28 22:23     ` Prakash Sangappa
2022-04-28 22:41       ` Thomas Gleixner [this message]
2022-04-29 17:53         ` Davidlohr Bueso
2022-04-28 22:50 ` Davidlohr Bueso

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=87tuacomps.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=peterz@infradead.org \
    --cc=prakash.sangappa@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.