From: Theodore Ts'o Subject: Re: [PATCH RFC] jbd: don't wake kjournald unnecessarily Date: Fri, 21 Dec 2012 12:46:02 -0500 Message-ID: <20121221174602.GA31731@thunk.org> References: <50D0A1FD.7040203@redhat.com> <20121219012710.GF5987@quack.suse.cz> <20121219020526.GG5987@quack.suse.cz> <50D12FC3.6090209@redhat.com> <20121219081334.GB20163@quack.suse.cz> <20121219153725.GD7795@thunk.org> <20121219171401.GB28042@quack.suse.cz> <20121219202734.GA18804@thunk.org> <50D49606.3020708@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , ext4 development To: Eric Sandeen Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:39771 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136Ab2LURqI (ORCPT ); Fri, 21 Dec 2012 12:46:08 -0500 Content-Disposition: inline In-Reply-To: <50D49606.3020708@redhat.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: On Fri, Dec 21, 2012 at 11:01:58AM -0600, Eric Sandeen wrote: > > I'm also really puzzled about how Eric's patch makes a 10% different > > on the AIM7 benchmark; as you've pointed out, that will just cause an > > extra wakeup of the jbd/jbd2 thread, which should then quickly check > > and decide to go back to sleep. > > Ted, just to double check - is that some wondering aloud, or a NAK > of the original patch? :) I'm still thinking.... Things that I don't understand worry me, since there's a possibility there's more going on than we think. Did you have a chance to have your perf people enable the the jbd2_run_stats tracepoint, to see how the stats change with and without the patch? It would be interesting to see how the stats change --- in particular, whether the number of blocks logged per transaction is changing, and/or the number of blocks per transaction is changing. It would also be interesting to insert a tracepoint in kjournald so we can track the number of times when kjournald is waking, but ends up *not* triggering a commit due to the commit timeout firing or j_commit_sequence != j_commit_request. I'll probably take the patch on the grounds that it's obvious, but if you could get your perf folks to run the experiment, I'd really appreciate it, just so we can understand what might be going on. Perhaps there's an opportunity for further optimizations, or we'll find that something unexpected that is evidence of a bug. (Or maybe it's just a bug in our understanding, but that's also good to get fixed. :-) - Ted