Bug 149574 - [patch] update mi_switch(9) man page
Summary: [patch] update mi_switch(9) man page
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mitchell Horne
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-08-12 14:40 UTC by pluknet
Modified: 2023-02-09 16:09 UTC (History)
4 users (show)

See Also:


Attachments
file.diff (6.18 KB, patch)
2010-08-12 14:40 UTC, pluknet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pluknet 2010-08-12 14:40:04 UTC
The mi_switch(9) manual page in tree is much outdated.
- sync with ctxsw.9, v1.3 (license) and partially with 1.5 (minor grammar)
- update subject signatures in SYNOPSYS to current source, add description of the 
newly added function arguments.
- use <the .Nm function> convention
- reword of now non-existing need_resched(9)
- remove sentence about KSE threading impl. details
- list the possible mi_switch flags values
- remove the mention of choosethread(9) call from cpu_switch() in the 
cpu_switch() paragraph as that's not true, and choosethread() is mainly called 
from sched_switch(), not cpu_switch
- remove a paragraph about runqueue(9) locking as it's long outdated
- xref thread_exit(9) and choosethread(9)

Fix: Patch attached with submission follows:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-08-12 17:11:13 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-doc

reclassify.
Comment 2 Glen Barber freebsd_committer freebsd_triage 2010-09-14 03:20:30 UTC
Responsible Changed
From-To: freebsd-doc->gjb

I'll take this.
Comment 3 Glen Barber freebsd_committer freebsd_triage 2010-10-01 12:51:37 UTC
Responsible Changed
From-To: gjb->freebsd-doc

Back to the pool for now due to lack of time.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:49 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-02-09 16:03:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=175db7b58270fb5ac98d874b106dc7b9afe7d9f6

commit 175db7b58270fb5ac98d874b106dc7b9afe7d9f6
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2023-02-09 15:41:14 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-09 16:01:32 +0000

    mi_switch(9): update to current day

    The function itself and much of the information in this page remains
    relevant, but many details need to be fixed.
     - Update function signatures
     - Update the list of major uses of mi_switch() (it is not exhaustive)
     - Document 'flags' argument and its possible values
     - Document thread lock requirement for callers
     - Thread runtime limits are out of scope now, no need to describe them
     - Remove outdated information w.r.t. KSE, runqueue, non-preemptible
       kernel, etc
     - Update the description of cpu_switch() and its responsibilities

    PR:             149574
    Reviewed by:    kib
    Discussed with: markj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D38185

 share/man/man9/mi_switch.9 | 216 ++++++++++++++++++++++++++++++---------------
 1 file changed, 147 insertions(+), 69 deletions(-)
Comment 6 Mitchell Horne freebsd_committer freebsd_triage 2023-02-09 16:09:10 UTC
To the original reporter: thanks for your submission. Ultimately I began the rewrite before I found this PR, and so your patch was not used. A lot of it was correct though :)

Closing this now. I probably won't merge to stable/13 unless specifically requested.