Commit Graph

37 Commits

Author SHA1 Message Date
Benjamin Kaduk
10038699fb Grammar tweaks for locking.9
Reviewed by:	jhb
Approved by:	hrs (mentor)
2013-06-30 19:33:07 +00:00
Joel Dahl
a9ca77e055 mdoc: remove EOL whitespace. 2013-06-29 16:05:44 +00:00
John Baldwin
ca6829ab99 Make a pass over this page to correct and clarify a few things as well as
some general word-smithing.
- Don't claim that adaptive mutexes have a timeout (they don't).
- Don't treat pool mutexes as a separate primitive in a few places.
- Describe sleepable read-mostly locks as a separate lock type and add
  them to the various tables.
- Don't claim that sx locks are less efficient.  That hasn't been true in
  a few years now.
- Describe lockmanager locks next to sx locks since they are very similar
  in terms of rules, etc., and so that all the lock primitives are
  grouped together before the non-lock primitives.
- Similarly, move the section on Giant after the description of all the
  non-lock primitives to preserve grouping.
- Condition variables work on several types of locks, not just mutexes.
- Add a bit of language to compare/contrast condition variables with
  sleep/wakeup.
- Add a note about why pause(9) is unique.
- Add some language to define bounded vs unbounded sleeps and explain
  why they are treated separately (bounded sleeps only need CPU time
  to make forward progress).
- Don't state that using mtx_sleep() is a bad idea.  It is in fact rather
  necessary.
- Rework the interaction table a bit.  First, it did not include really
  include sleepable rmlocks and it left out lockmgr entirely.  To get
  things to fit, combine similar lock types into the same column / row,
  and explicitly state what "sleep" means.  The notes about recursion
  and lock order were also a bit banal (lock order is always important,
  not just in the few places annotated here), so remove them.  In
  particular, the lock order note would need to be on just about every
  cell.  If we want to document recursion I think a better approach
  would be a separate table summarizing the recursion rules for each
  lock as having too many notes clutters the table.
- Tweak the tables to use less indentation so everything still fits with
  the added columns.
- Correct a few cells in the context mode table.
- Use mdoc markup instead of explicit markup in a few places.

Requested by:	julian
MFC after:	2 weeks
2013-06-28 16:33:45 +00:00
Ed Maste
5aa42cabe0 Remove reference to removed !MPSAFE filesystem support 2013-05-22 16:33:28 +00:00
Joel Dahl
b1edef175b Remove contractions. 2013-04-11 18:46:41 +00:00
Sergey Kandaurov
f2fbdacbf8 Remove a duplicated "thread". 2012-08-30 11:52:26 +00:00
Julian Elischer
2139f5e0df Try clean up some of my original text and neaten a table.
MFC after:	1 week
2012-06-27 01:13:37 +00:00
Edward Tomasz Napierala
18183ca93f Fix lock interaction table for rmlocks - by default they cannot sleep,
just like rwlocks.

MFC after:	1 week
2012-05-29 14:41:16 +00:00
Glen Barber
73bbeaa529 Typo and mdoc(7) style fixes.
PR:		168117
Submitted by:	Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after:	3 days
2012-05-20 16:43:47 +00:00
Glen Barber
0dded3391e Remove duplicate words in mdoc(7) pages.
PR:		167810
Submitted by:	Bryan Drewery {bryan!shatow%net} (hackers lounge)
Found with:	textproc/igor
MFC after:	3 days
2012-05-12 03:46:43 +00:00
Joel Dahl
4008d26a11 Fix typo from last commit.
Noticed by:	brueffer
2012-03-29 20:55:45 +00:00
Joel Dahl
10b4d262da Remove unnecessary Xo/Xc.
Reviewed by:	brueffer
2012-03-29 20:23:35 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
3030137a23 Remove superfluous paragraph macro. 2012-03-24 13:37:57 +00:00
Edward Tomasz Napierala
8de599ec35 Xref BUS_SETUP_INTR(9) and locking(9). 2010-11-03 18:49:50 +00:00
Max Laier
36058c09e4 rmlock(9) two additions and one change/fix:
- add rm_try_rlock().
 - add RM_SLEEPABLE to use sx(9) as the back-end lock in order to sleep while
   holding the write lock.
 - change rm_noreadtoken to a cpu bitmask to indicate which CPUs need to go
   through the lock/unlock in order to synchronize.  As a side effect, this
   also avoids IPI to CPUs without any readers during rm_wlock.

Discussed with:		ups@, rwatson@ on arch@
Sponsored by:		Isilon Systems, Inc.
2010-09-01 19:50:03 +00:00
Edward Tomasz Napierala
6b85cd6ddc s/ithread/interrupt thread/ 2010-08-24 21:38:44 +00:00
Joel Dahl
b06cfd40f9 Fix a bunch of typos and spelling mistakes. 2010-07-31 12:14:28 +00:00
Edward Tomasz Napierala
88238a0805 Some rewording and language fixes.
PR:		docs/136918, docs/134074
Submitted by:	Ben Kaduk <kaduk at mit dot edu>, Haven Hash <havenster at gmail dot com>
2010-02-15 17:41:59 +00:00
Edward Tomasz Napierala
ddcd2bc9ec Remove list of locking primitives, which is kind of redundant, move
information about witness(9) to the section about interactions, and
expand 'contexts' table.
2010-02-13 12:03:03 +00:00
Edward Tomasz Napierala
b132183383 Start sentences with a new line.
Submitted by:	brueffer
2010-02-10 19:03:48 +00:00
Edward Tomasz Napierala
0b0b48c06a Improve description for Giant and mention blocking inside interrupt threads. 2010-02-10 17:02:06 +00:00
Edward Tomasz Napierala
4ff467dc65 Cosmetic fixes. 2010-01-28 21:14:12 +00:00
Edward Tomasz Napierala
561205dff6 Add description of bounded sleep vs unbounded sleep (aka blocking). Move
rules into their own section.
2010-01-28 19:57:24 +00:00
Edward Tomasz Napierala
815e47727e Improve descriptions, remove turnstiles (since, from what I understand,
they are only used to implement other synchronization primitives), tweak
formatting.
2010-01-28 17:09:47 +00:00
Stephan Uphoff
f53d15fe1b Initial checkin for rmlock (read mostly lock) a multi reader single writer
lock optimized for almost exclusive reader access. (see also rmlock.9)

TODO:
    Convert to per cpu variables linkerset as soon as it is available.
    Optimize UP (single processor)  case.
2007-11-08 14:47:55 +00:00
Julian Elischer
20f16ca028 Corrections and clarifications
Approved by: re (bmah)
2007-08-09 21:09:56 +00:00
Christian Brueffer
3111fc98d5 Remove duplicate xref and add missing commas.
PR:		113891
Submitted by:	pluknet <pluknet@gmail.com>
Approved by:	re (blanket)
2007-06-21 16:39:25 +00:00
Xin LI
f9d63aec3f Markup fixes. 2007-06-01 03:11:47 +00:00
Warner Losh
fbe508ffba Giant is special. How do I love thee? Let me count the ways?
errr, I mean "Enumerate how the giant lock differs from other locks"

Please let me know if I missed any.  Or misrepresented any...

Reviewed by: ssouhlal@
2007-05-31 00:05:59 +00:00
Xin LI
46d98f5737 - Remove an unneeded comma
- Remove a redundant .Xc
 - Spell "Largely" as it should.
2007-03-19 07:49:11 +00:00
Julian Elischer
4ff78a9ca8 More corrections, this time from Wojciech Koszek 2007-03-18 19:28:44 +00:00
Julian Elischer
53882c7c96 Spelling and whitespace fixes from Dunne Whitty 2007-03-18 18:57:38 +00:00
Julian Elischer
626d3f9f41 fix braino in markup. 2007-03-14 17:33:16 +00:00
Julian Elischer
c2c54c3d82 More suggestions from pjd. 2007-03-14 06:27:02 +00:00
Julian Elischer
34e1b9e5f0 Some comments from pjd 2007-03-14 06:12:36 +00:00
Julian Elischer
0929bf8e57 Add locking.9
This is supposed to be a brief overview of the locking primatives.
It is not yet complete and contains many place-holders for information
I do not know.

The locking is getting so diverse that I've lost track of it all.
We need this page to keep outselves in sync with what the primitives do.

note.. not part of the build yet.
2007-03-14 04:00:24 +00:00