All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>, Tim Gardner <rtg.canonical@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	tim.gardner@canonical.com
Subject: Re: [PATCH V3] block: Mitigate lock unbalance caused by lock switching
Date: Wed, 06 Jun 2012 10:12:43 +0800	[thread overview]
Message-ID: <4FCEBC9B.5040201@redhat.com> (raw)
In-Reply-To: <4FC88BF9.2030807@kernel.dk>

Hello, Jens

On 06/01/2012 05:31 PM, Jens Axboe wrote:
> On 05/30/2012 08:28 AM, Tejun Heo wrote:
>> Hello,
>>
>> On Wed, May 30, 2012 at 3:28 PM, Asias He<asias@redhat.com>  wrote:
>>>> Isn't the 'if' clause superfluous ? You could just do the assignment,
>>>> e.g.,
>>>>
>>>> +       spin_lock_irq(lock);
>>>> +       q->queue_lock =&q->__queue_lock;
>>>> +       spin_unlock_irq(lock);
>>>
>>>
>>> Well, this saves a if clause but adds an unnecessary assignment if the lock
>>> is already internal lock.
>>
>> It's not hot path. Dirtying the cacheline there doesn't mean anything.
>> I don't really care either way but making optimization argument is
>> pretty silly here.
>
> And more importantly, dropping the if loses information as well. That's
> a lot more important than any misguided optimization attempts. So I
> agree, the if stays.

Could you pick this patch in your tree?

-- 
Asias

      reply	other threads:[~2012-06-06  2:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25  2:10 [PATCH] block: Fix lock unbalance caused by lock disconnect Asias He
2012-05-28  0:07 ` Tejun Heo
2012-05-28  2:15   ` Asias He
2012-05-28 10:20     ` Tejun Heo
2012-05-29  1:49       ` Asias He
2012-06-01  9:28       ` Michael S. Tsirkin
2012-05-28  2:20   ` [PATCH v2] block: Mitigate " Asias He
2012-05-28 10:22     ` Tejun Heo
2012-05-29  1:39       ` [PATCH V3] block: Mitigate lock unbalance caused by lock switching Asias He
2012-05-29  1:39         ` [PATCH] " Asias He
2012-05-29  1:41         ` [PATCH V3] " Tejun Heo
2012-05-29 13:45         ` Tim Gardner
2012-05-30  6:28           ` Asias He
2012-05-30  6:28             ` Tejun Heo
2012-05-30  6:28               ` Tejun Heo
2012-05-30  6:50               ` Asias He
2012-06-01  9:31               ` Jens Axboe
2012-06-06  2:12                 ` Asias He [this message]

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=4FCEBC9B.5040201@redhat.com \
    --to=asias@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtg.canonical@gmail.com \
    --cc=tim.gardner@canonical.com \
    --cc=tj@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.