All of lore.kernel.org
 help / color / mirror / Atom feed
From: BVK Chaitanya <bayapuneni_chaitanya@symantec.com>
To: Neil Turton <nturton@solarflare.com>
Cc: Xen-devel@lists.xensource.com
Subject: Re: On netfront accelerator add/remove watches
Date: Wed, 30 Jul 2008 10:28:50 +0530	[thread overview]
Message-ID: <488FF50A.5000404@symantec.com> (raw)
In-Reply-To: <488EFA50.1070708@solarflare.com>

Neil Turton wrote:
> Hi,
> 
> BVK Chaitanya wrote:
>> I see that netfront_accel_add_watch and netfront_accel_remove_watch 
>> functions are _not_ protected by accelerator_mutex in accel.c   Is there 
>> any specific reason for this?
> 
> Yes.  These functions need to be synchronised by the callers.  Adding a
> mutex here would ensure that they didn't execute at the same time, but
> wouldn't impose any order on the calls.  This matters because add
> followed by remove is different from remove followed by add.  The
> callers need to decide which order they should be executed in.
> 
> So the watch is only added/removed from a xenbus callback.  I think
> these callbacks should be synchronised by xenbus.  Can someone confirm that?

OK. I understand it now.

> 
>> I see that they sometimes get called twice (and result in BUG_ON) in 
>> very fast (20ms) domain suspend-resume cycles and I couldn't figure out 
>> how it is possible :-(
> 
> Is that the BUG_ON in netfront_accelerator_add_watch?  One possible
> explanation is that suspend_cancel is called and then otherend_changed
> is called.  Can you add a printk to netfront_suspend_cancel to see if it
> gets called just before the BUG_ON gets triggered?
> 

Yes, BUG_ON was from netfront_accelerator_add_watch function.  I think i 
got the problem: xen_suspend which calls suspend_cancel is not 
serialized properly.

Under heavy load and very fine suspend-resume cycles, multiple 
suspend_cancel instances can be running simultaneously.


regards,
--
bvk-chaitanya

  reply	other threads:[~2008-07-30  4:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29  3:32 On netfront accelerator add/remove watches BVK Chaitanya
2008-07-29 11:09 ` Neil Turton
2008-07-30  4:58   ` BVK Chaitanya [this message]
2008-07-30 15:17     ` Kieran Mansley
2008-07-31 12:44       ` BVK Chaitanya

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=488FF50A.5000404@symantec.com \
    --to=bayapuneni_chaitanya@symantec.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=nturton@solarflare.com \
    /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.