From: Daniel Wagner <daniel.wagner@bmw-carit.de>
To: Jeff Layton <jlayton@poochiereds.net>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
"J. Bruce Fields" <bfields@fieldses.org>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH v3 0/2] Use blocked_lock_lock only to protect blocked_hash
Date: Thu, 26 Mar 2015 14:55:38 +0100 [thread overview]
Message-ID: <55140FDA.4020504@bmw-carit.de> (raw)
In-Reply-To: <20150326091729.29085942@tlielax.poochiereds.net>
>> - I also played with lockdep detection. With lglock-v0 applied
>> some tests like flock02 and posix02 get considerable worse
>> results. The difference between flock01 and flock02 is that
>> the children of flock01 fight over one file lock versus
>> the children of flock02 lock and unlock their own lock.
>> My best guess is that the lockdep tracing is adding
>> far more to the per child lock configuration. I didn't find
>> any other explanation than this. Although I have to admit
>> I can't find a good argument why this makes a difference
>> between arch_spinlock_t and spinlock_t.
>>
[...]
> lockdep has overhead, and when you move from arch_spinlock_t to
> "normal" spinlock_t's you end up with per-spinlock lockdep structures.
> I wouldn't worry much about performance with lockdep enabled.
That was the missing piece. Okay, that explains the performance degradation.
>>> You had mentioned at one point that lglocks didn't play well with the
>>> -rt kernels. What's the actual problem there?
>>
>> -rt kernels like to preempt everything possible. One mean to achieve
>> this is by exchanging normal spinlock_t with rt_mutex. arch_spinlock_t
>> does not get this treatment automatically via the lock framework.
>> For this following patch is carried around:
>>
>> https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=da1cbed0dcf6ab22a4b50b0c5606271067749aef
>>
>> struct lglock {
>> +#ifndef CONFIG_PREEMPT_RT_FULL
>> arch_spinlock_t __percpu *lock;
>> +#else
>> + struct rt_mutex __percpu *lock;
>> +#endif
>> #ifdef CONFIG_DEBUG_LOCK_ALLOC
>> struct lock_class_key lock_key;
>> struct lockdep_map lock_dep_map;
>> #endif
>> };
>>
>> [...]
>>
>
> Ok. Is that approach problematic in some way?
I expect that mainline wont accept such a patch :). T
> I'm trying to understand the exact problem that you're
> trying to solve for -rt with this effort.
My aim is to rid of the -rt patches and mainline the features. This here
is just my small contribution to the whole -rt effort.
cheers,
daniel
prev parent reply other threads:[~2015-03-26 13:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 7:53 [PATCH v3 0/2] Use blocked_lock_lock only to protect blocked_hash Daniel Wagner
2015-03-06 7:53 ` [PATCH v3 1/2] locks: Split insert/delete block functions into flock/posix parts Daniel Wagner
2015-03-06 7:53 ` [PATCH v3 2/2] locks: Use blocked_lock_lock only to protect blocked_hash Daniel Wagner
2015-03-07 14:00 ` [PATCH v3 0/2] " Jeff Layton
2015-03-07 14:09 ` Jeff Layton
2015-03-10 8:20 ` Daniel Wagner
2015-03-14 12:40 ` Jeff Layton
2015-03-26 10:11 ` Daniel Wagner
2015-03-26 13:17 ` Jeff Layton
2015-03-26 13:55 ` Daniel Wagner [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=55140FDA.4020504@bmw-carit.de \
--to=daniel.wagner@bmw-carit.de \
--cc=andi@firstfloor.org \
--cc=bfields@fieldses.org \
--cc=jlayton@poochiereds.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).