From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Nicolas Pitre <nico@linaro.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org, Dave Chinner <dchinner@redhat.com>,
Brian Foster <bfoster@redhat.com>,
Eric Sandeen <sandeen@sandeen.net>
Subject: Re: [PATCH] [RFC] xfs: work around unlikely() profiler glitch
Date: Wed, 25 Jan 2017 16:15:19 +0100 [thread overview]
Message-ID: <CAK8P3a0mrqQQf=-=_O+ULwpQ5qzHWjfbxRoNxBv-7A+GDUYL2A@mail.gmail.com> (raw)
In-Reply-To: <20170125150929.GA19906@infradead.org>
On Wed, Jan 25, 2017 at 4:09 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Wed, Jan 25, 2017 at 03:08:10PM +0100, Arnd Bergmann wrote:
>> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
>> index d22f7930eb75..dca3ddd737d4 100644
>> --- a/fs/xfs/libxfs/xfs_bmap.c
>> +++ b/fs/xfs/libxfs/xfs_bmap.c
>> @@ -3629,7 +3629,7 @@ xfs_bmap_btalloc(
>> align = xfs_get_cowextsz_hint(ap->ip);
>> else if (xfs_alloc_is_userdata(ap->datatype))
>> align = xfs_get_extsz_hint(ap->ip);
>> - if (unlikely(align)) {
>> + if (unlikely_notrace(align)) {
>> error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
>> align, 0, ap->eof, 0, ap->conv,
>> &ap->offset, &ap->length);
>
> The unlikely calls on align in xfs_bmap_btalloc should simply be
> removed. They aren't actually unlikely for many workloads. I have
> a patch in my queue that I can expedite based on your report.
That would defines help, thanks!
I also noticed that my patch wouldn't work, as unlikely_notrace() is not
defined unless we are actually tracing, so while it fixes some rare
configurations, it breaks all the configurations that matter.
Arnd
next prev parent reply other threads:[~2017-01-25 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 14:08 [PATCH] [RFC] xfs: work around unlikely() profiler glitch Arnd Bergmann
2017-01-25 15:09 ` Christoph Hellwig
2017-01-25 15:15 ` Arnd Bergmann [this message]
2017-01-25 16:24 ` Darrick J. Wong
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='CAK8P3a0mrqQQf=-=_O+ULwpQ5qzHWjfbxRoNxBv-7A+GDUYL2A@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=dchinner@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nico@linaro.org \
--cc=rostedt@goodmis.org \
--cc=sandeen@sandeen.net \
/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).