All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@linux.vnet.ibm.com>
To: kvm@vger.kernel.org
Subject: Documentation of the kvm->srcu lock
Date: Mon, 9 Sep 2013 14:00:32 +0200	[thread overview]
Message-ID: <20130909140032.3fb22a4a@thhw500> (raw)


 Hi all!

I am quite new to KVM, and I recently had to struggle with the
kvm->srcu lock a little bit ... documentation for this lock seems
to be quite sparse, I've only found some descriptions in mailing
list archives (the description at the following URL is quite good:
http://www.mail-archive.com/kvm@vger.kernel.org/msg90003.html ).

So I wonder whether it would be helpful for others, too, if some
information about this lock was added to the documentation file
Documentation/virtual/kvm/locking.txt for example? I'd like to
suggest the following text as a first draft (using some information
from the URL above):

 Name:		kvm->srcu
 Type:		srcu lock
 Arch:		any
 Protects:	- kvm->memslots
 		- kvm->buses
 Comment:	The srcu read lock must be held while accessing memslots (e.g.
 		when using gfn_to_* functions) and while accessing in-kernel
 		MMIO/PIO address->device structure mapping (kvm->buses).
 		The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
 		if it is needed by multiple functions.

What do you think? Since I am not an expert in this area, extension
and/or corrections are very welcome!

 Regards,
  Thomas


             reply	other threads:[~2013-09-09 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 12:00 Thomas Huth [this message]
2013-09-09 12:13 ` Documentation of the kvm->srcu lock Paolo Bonzini
2013-09-09 12:26   ` Xiao Guangrong
2013-09-09 12:47     ` Thomas Huth
2013-09-09 13:51       ` Paolo Bonzini

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=20130909140032.3fb22a4a@thhw500 \
    --to=thuth@linux.vnet.ibm.com \
    --cc=kvm@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 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.