All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>,
	Jennifer Herbert <jennifer.herbert@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCHv4 5/8] xen: use ticket locks for spin locks
Date: Tue, 5 May 2015 14:56:07 +0100	[thread overview]
Message-ID: <1430834167.2660.102.camel@citrix.com> (raw)
In-Reply-To: <1430408002-30666-6-git-send-email-david.vrabel@citrix.com>

On Thu, 2015-04-30 at 16:33 +0100, David Vrabel wrote:
>  
>  void _spin_lock_irq(spinlock_t *lock)
>  {
> -    LOCK_PROFILE_VAR;
> -
>      ASSERT(local_irq_is_enabled());
>      local_irq_disable();
> -    check_lock(&lock->debug);
> -    while ( unlikely(!_raw_spin_trylock(&lock->raw)) )
> -    {
> -        LOCK_PROFILE_BLOCK;
> -        local_irq_enable();
> -        while ( likely(_raw_spin_is_locked(&lock->raw)) )
> -            cpu_relax();
> -        local_irq_disable();
> -    }
> -    LOCK_PROFILE_GOT;
> -    preempt_disable();
> +    _spin_lock(lock);

This (and the irqsave variant) differs in that it spins/waits with irq's
disabled unlike the previous implementation which enabled irqs while it
waited.

Is this change intentional? I think it warrants a mention and rationale
in the commit log if so.

  reply	other threads:[~2015-05-05 13:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 15:33 [PATCHv4 0/8] Use ticket locks for spinlocks David Vrabel
2015-04-30 15:33 ` [PATCHv4 1/8] x86: provide arch_fetch_and_add() David Vrabel
2015-05-07 15:59   ` Jan Beulich
2015-04-30 15:33 ` [PATCHv4 2/8] arm: " David Vrabel
2015-04-30 15:33 ` [PATCHv4 3/8] x86: provide add_sized() David Vrabel
2015-05-07 16:05   ` Jan Beulich
2015-04-30 15:33 ` [PATCHv4 4/8] arm: " David Vrabel
2015-05-05 13:49   ` Ian Campbell
2015-05-05 13:54     ` Tim Deegan
2015-04-30 15:33 ` [PATCHv4 5/8] xen: use ticket locks for spin locks David Vrabel
2015-05-05 13:56   ` Ian Campbell [this message]
2015-05-05 13:58     ` David Vrabel
2015-05-08  9:36   ` Jan Beulich
2015-05-11 13:13     ` David Vrabel
2015-05-11 13:29       ` Tim Deegan
2015-04-30 15:33 ` [PATCHv4 6/8] x86, arm: remove asm/spinlock.h from all architectures David Vrabel
2015-05-05 13:49   ` Ian Campbell
2015-04-30 15:33 ` [PATCHv4 7/8] x86: reduce struct paging_domain size David Vrabel
2015-04-30 15:33 ` [PATCHv4 8/8] x86: reduce struct hvm_domain size David Vrabel
2015-05-08  9:47   ` Jan Beulich
2015-05-11 13:17     ` David Vrabel

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=1430834167.2660.102.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jennifer.herbert@citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.