All of lore.kernel.org
 help / color / mirror / Atom feed
From: tupeng212 <tupeng212@gmail.com>
To: Jan Beulich <JBeulich@suse.com>, Keir Fraser <keir@xen.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: gnttab: don't use domain lock for serialization
Date: Tue, 16 Oct 2012 22:38:17 +0800	[thread overview]
Message-ID: <201210162238055789394@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]

xen/common/grant_table.c 
174 static inline void 
175 double_gt_lock(struct grant_table *lgt, struct grant_table *rgt) 
176 { 
177 if ( lgt < rgt ) 
178 { 
179 spin_lock(&lgt->lock); 
180 spin_lock(&rgt->lock); 
181 } 
182 else 
183 { 
184 if ( lgt != rgt ) 
185     spin_lock(&rgt->lock); 
186 spin_lock(&lgt->lock); //here if the same, we just lock once.
187 } 
188 }

I have a question, when lgt == rgt ? 
remote domain's grant_table is created by itself, so how they get the same?
Thanks a lot!




tupeng212

[-- Attachment #1.2: Type: text/html, Size: 2229 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2012-10-16 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 14:38 tupeng212 [this message]
2012-10-16 14:49 ` gnttab: don't use domain lock for serialization Jan Beulich

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=201210162238055789394@gmail.com \
    --to=tupeng212@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.