public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: linux-man@vger.kernel.org, a.clayton@nginx.com
Cc: Alejandro Colomar <alx@kernel.org>,
	andrew@digital-domain.net, Alejandro Colomar <alx@nginx.com>
Subject: [PATCH 2/3] sched_yield.2: NOTES: Remove misleading sentence
Date: Wed,  3 May 2023 19:03:52 +0200	[thread overview]
Message-ID: <20230503170353.25998-3-alx@kernel.org> (raw)
In-Reply-To: <20230503170353.25998-1-alx@kernel.org>

sched_yield(2) is not the right thing for heavily contended resources.
The right thing to do is to call functions that wake the waiting threads.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
---
 man2/sched_yield.2 | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/man2/sched_yield.2 b/man2/sched_yield.2
index bab0f9569..5e5b45a48 100644
--- a/man2/sched_yield.2
+++ b/man2/sched_yield.2
@@ -54,11 +54,6 @@ .SH NOTES
 it will continue to run after a call to
 .BR sched_yield ().
 .PP
-Strategic calls to
-.BR sched_yield ()
-can improve performance by giving other threads or processes
-a chance to run when (heavily) contended resources (e.g., mutexes)
-have been released by the caller.
 Avoid calling
 .BR sched_yield ()
 unnecessarily or inappropriately
-- 
2.40.1


  parent reply	other threads:[~2023-05-03 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 17:03 [PATCH 0/3] Discourage sched_yield(2) Alejandro Colomar
2023-05-03 17:03 ` [PATCH 1/3] sched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional Alejandro Colomar
2023-05-03 17:03 ` Alejandro Colomar [this message]
2023-05-03 17:03 ` [PATCH 3/3] sched_yield.2: Rename NOTES to CAVEATS, and reorder contents Alejandro Colomar

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=20230503170353.25998-3-alx@kernel.org \
    --to=alx.manpages@gmail.com \
    --cc=a.clayton@nginx.com \
    --cc=alx@kernel.org \
    --cc=alx@nginx.com \
    --cc=andrew@digital-domain.net \
    --cc=linux-man@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