linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: Shaohua Li <shli@kernel.org>, Vivek Goyal <vgoyal@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Knut Petersen <Knut_Petersen@t-online.de>,
	mroos@linux.ee, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] block: strip out locking optimization in put_io_context()
Date: Sat, 11 Feb 2012 12:35:07 +0100	[thread overview]
Message-ID: <4F36526B.7070809@kernel.dk> (raw)
In-Reply-To: <20120211021724.GO19392@google.com>

On 2012-02-11 03:17, Tejun Heo wrote:
> Hello,
> 
> On Fri, Feb 10, 2012 at 04:48:49PM +0800, Shaohua Li wrote:
>>>> Can you please test the following one?  It's probably the simplest
>>>> version w/o RCU and wq deferring.  RCUfying isn't too bad but I'm
>>>> still a bit hesitant because RCU coverage needs to be extended to
>>>> request_queue via conditional synchronize_rcu() in queue exit path
>>>> (can't enforce delayed RCU free on request_queues and unconditional
>>>> synchronize_rcu() may cause excessive delay during boot for certain
>>>> configurations).  It now can be done in the block core layer proper so
>>>> it shouldn't be as bad tho.  If this too flops, I'll get to that.
>>> doesn't work.
>> I added trace in the schedule_work code path of put_io_context, which
>> runs very rare. So it's not lock contention for sure.
>> Sounds the only difference between the good/bad cases is the good
>> case runs with rcu_lock_read/rcu_read_unlock. I also checked slab
>> info, the cfq related slab doesn't use too many memory, unlikely
>> because rcu latency uses too many memory.
> 
> Yeah, that makes much more sense.  It just isn't hot enough path for
> this sort of micro locking changes to matter.  I think the problem is
> that, after the change, the cfqq aren't being expired immediately on
> task exit.  ie. While moving the cic destruction to release path, I
> accidentally removed exit notification to cfq.  I'll come up with a
> fix.

Was just thinking about that last night, the missing slice expire on
task exit makes a LOT more sense than changed locking.

I'm pushing off what I have to Linus today, since I'll be gone skiing
next week. I will check email regularly and be able to apply patches and
so forth, just a heads up on availability.

-- 
Jens Axboe


  reply	other threads:[~2012-02-11 11:35 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  7:50 [patch]block: fix ioc locking warning Shaohua Li
2012-02-06  7:55 ` Jens Axboe
2012-02-06 15:12 ` Vivek Goyal
2012-02-06 16:09   ` Jens Axboe
2012-02-06 16:37     ` Vivek Goyal
2012-02-06 16:44       ` Tejun Heo
2012-02-06 16:58         ` Linus Torvalds
2012-02-06 17:27           ` Tejun Heo
2012-02-06 20:16             ` Jens Axboe
2012-02-06 21:54               ` [PATCH] block: strip out locking optimization in put_io_context() Tejun Heo
2012-02-07  6:49                 ` Jens Axboe
2012-02-07 16:22                   ` Tejun Heo
2012-02-07 16:28                     ` Jens Axboe
2012-02-07 16:33                       ` Linus Torvalds
2012-02-07 16:47                         ` Tejun Heo
2012-02-07 17:17                           ` Tejun Heo
2012-02-08  0:19                           ` Shaohua Li
2012-02-08  8:29                             ` Shaohua Li
2012-02-08 16:29                               ` Tejun Heo
2012-02-08 16:34                                 ` Linus Torvalds
2012-02-08 16:49                                   ` Tejun Heo
2012-02-08 16:56                                     ` Tejun Heo
2012-02-08 17:23                                       ` Tejun Heo
2012-02-09  6:22                                 ` Shaohua Li
2012-02-09 17:59                                   ` Tejun Heo
2012-02-09 18:07                                     ` Linus Torvalds
2012-02-09 19:24                                       ` Tejun Heo
2012-02-09 23:48                                         ` Tejun Heo
2012-02-10  5:14                                           ` Shaohua Li
2012-02-10  8:48                                             ` Shaohua Li
2012-02-11  2:17                                               ` Tejun Heo
2012-02-11 11:35                                                 ` Jens Axboe [this message]
2012-02-13  1:34                                                 ` Shaohua Li
2012-02-13 20:49                                                   ` Tejun Heo
2012-02-14  2:36                                                     ` Shaohua Li
2012-02-14 16:39                                                       ` Tejun Heo
2012-02-10  3:09                                       ` Shaohua Li
2012-02-07 23:00                   ` [PATCH] block: fix lockdep warning on io_context release put_io_context() Tejun Heo
2012-02-06 20:36             ` [patch]block: fix ioc locking warning Tejun Heo
2012-02-07  0:31               ` Shaohua Li
2012-02-07  0:39                 ` Tejun Heo
2012-02-07  0:43                   ` Shaohua Li
2012-02-07  0:59                     ` Tejun Heo
2012-02-07  1:10                       ` Shaohua Li
2012-02-07  1:33                         ` Shaohua Li
2012-02-07  5:22                       ` Shaohua Li
2012-02-07 22:34                         ` Linus Torvalds
2012-02-06 16:22 ` Tejun Heo
2012-02-08 18:07 ` walt

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=4F36526B.7070809@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Knut_Petersen@t-online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=shli@kernel.org \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.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 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).