Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Holger Dengler <dengler@linux.ibm.com>
Cc: Harald Freudenberger <freude@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Vineeth Vijayan <vneethv@linux.ibm.com>,
	Peter Oberparleiter <oberpar@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	David Hildenbrand <david@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] s390/crypto: Replace cond_resched() with schedule()
Date: Tue, 28 Jul 2026 14:06:01 +0200	[thread overview]
Message-ID: <20260728120601.16874Adc-hca@linux.ibm.com> (raw)
In-Reply-To: <09e9a0f4-48c7-4e63-a6f3-dae61c1f94e1@linux.ibm.com>

On Tue, Jul 28, 2026 at 11:51:04AM +0200, Holger Dengler wrote:
> On 7/28/26 10:29, Heiko Carstens wrote:
> > Well, the main question still remains: why did the code use cond_resched()?
> > 
> > This doesn't make sense to me, at least when reading the comment. So to me
> > even the schedule() approach I proposed is questionable. Why didn't the code
> > use msleep() instead? Or can we just remove cond_resched() entirely without
> > any replacement?
> 
> As the comment says, if possible, the scheduler should run any other
> workload in case of a -EKEYEXPIRED, as the re-creation of the protected key
> is in progress.
> 
> My current understanding was (and still is), that cond_resched() (or even
> schedule()) is doing exactly that: give back the control to the scheduler.

This is not the case, and never was (maybe it was for schedule() before CFS,
but that's history). See also Peter's reply.

> If this is not the case, but msleep() is doing the trick, I would vote for
> msleep().

Ok, then I change cond_resched() to msleep(1).

  reply	other threads:[~2026-07-28 12:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 16:24 [PATCH 0/4] s390: Remove or replace cond_resched() calls Heiko Carstens
2026-07-27 16:24 ` [PATCH 1/4] s390/crypto: Replace cond_resched() with schedule() Heiko Carstens
2026-07-27 17:05   ` sashiko-bot
2026-07-28  7:05   ` Harald Freudenberger
2026-07-28  8:29     ` Heiko Carstens
2026-07-28  8:53       ` Harald Freudenberger
2026-07-28  9:51       ` Holger Dengler
2026-07-28 12:06         ` Heiko Carstens [this message]
2026-07-28 10:43       ` Peter Zijlstra
2026-07-27 16:24 ` [PATCH 2/4] KVM: s390: Remove cond_resched() calls Heiko Carstens
2026-07-27 16:57   ` sashiko-bot
2026-07-27 16:24 ` [PATCH 3/4] " Heiko Carstens
2026-07-27 16:54   ` sashiko-bot
2026-07-27 16:24 ` [PATCH 4/4] s390/cio: " Heiko Carstens
2026-07-27 16:54   ` sashiko-bot
2026-07-28  9:28   ` Peter Oberparleiter

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=20260728120601.16874Adc-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@kernel.org \
    --cc=dengler@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=svens@linux.ibm.com \
    --cc=vneethv@linux.ibm.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