linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: new metadata reader/writer locks in integration-test
Date: Thu, 21 Jul 2011 12:54:02 +0800	[thread overview]
Message-ID: <4E27B0EA.2070601@cn.fujitsu.com> (raw)
In-Reply-To: <1311187835-sup-7598@shiny>

Chris Mason wrote:
> Excerpts from Chris Mason's message of 2011-07-20 13:21:47 -0400:
>> Excerpts from Chris Mason's message of 2011-07-19 13:30:22 -0400:
>>> Hi everyone,
>>>
>>> I've pushed out a new integration-test branch, and it includes a new
>>> reader/writer locking scheme for the btree locks.
>>>
>>> We've seen a number of benchmarks dominated by contention on the root
>>> node lock.  This changes our locks into a simple reader/writer lock.
>>> They are based on mutexes so that we still take advantage of the mutex
>>> adaptive spins for write locks (rwsemaphores were much slower).
>>>
>>> I'm also sending the individual commits, please do take a look.
>>
>> Hi everyone,
>>
>> I just rebased Josef's enospc fixes into integration-test, it should fix
>> the warnings in extent-tree.c
> 
> And one more rebase to fix the x86-32 problems.
> 

We can simply use page_address() in this macro:

#define BTRFS_SETGET_HEADER_FUNCS(name, type, member, bits)             \
static inline u##bits btrfs_##name(struct extent_buffer *eb)            \
{                                                                       \
        type *p = kmap_atomic(eb->first_page, KM_USER0);                \
        u##bits res = le##bits##_to_cpu(p->member);                     \
        kunmap_atomic(p, KM_USER0);                                     \
        return res;                                                     \
}

  reply	other threads:[~2011-07-21  4:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 17:30 new metadata reader/writer locks in integration-test Chris Mason
2011-07-20  2:08 ` Tsutomu Itoh
2011-07-20  7:58   ` Chris Mason
2011-07-20  8:36     ` Tsutomu Itoh
2011-07-22 15:49       ` Chris Mason
2011-07-20  6:55 ` Arne Jansen
2011-07-20 16:49   ` Arne Jansen
2011-07-20 17:21 ` Chris Mason
2011-07-20 18:51   ` Chris Mason
2011-07-21  4:54     ` Li Zefan [this message]
2011-07-21  0:48   ` Tsutomu Itoh
2011-07-21  5:46     ` Arne Jansen
2011-07-22  0:53       ` Chris Mason
2011-07-22  4:06         ` Miao Xie
2011-07-22  9:12           ` Miao Xie
2011-07-21  5:44   ` Arne Jansen
2011-07-22 15:58     ` Arne Jansen
2011-07-22 15:01 ` rw_semaphore performance, was: " Christoph Hellwig
2011-07-22 15:14   ` Chris Mason

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=4E27B0EA.2070601@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).