linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: extsize hints are not unlikely in xfs_bmap_btalloc
@ 2017-01-25 16:56 Christoph Hellwig
  2017-01-25 16:59 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2017-01-25 16:56 UTC (permalink / raw)
  To: darrick.wong; +Cc: arnd, linux-xfs

With COW files they are the hotpath, just like for files with the
extent size hint attribute.  We really shouldn't micro-manage anything
but failure cases with unlikely.

Additionally Arnd Bergmann recently reported that one of these two
unlikely annotations causes link failures together with an upcoming
kernel instrumentation patch, so let's get rid of it ASAP.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_bmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index ab82dd4..bfc00de 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 (align) {
 		error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
 						align, 0, ap->eof, 0, ap->conv,
 						&ap->offset, &ap->length);
@@ -3701,7 +3701,7 @@ xfs_bmap_btalloc(
 		args.minlen = ap->minlen;
 	}
 	/* apply extent size hints if obtained earlier */
-	if (unlikely(align)) {
+	if (align) {
 		args.prod = align;
 		if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
 			args.mod = (xfs_extlen_t)(args.prod - args.mod);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: extsize hints are not unlikely in xfs_bmap_btalloc
  2017-01-25 16:56 [PATCH] xfs: extsize hints are not unlikely in xfs_bmap_btalloc Christoph Hellwig
@ 2017-01-25 16:59 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2017-01-25 16:59 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: arnd, linux-xfs

On Wed, Jan 25, 2017 at 05:56:41PM +0100, Christoph Hellwig wrote:
> With COW files they are the hotpath, just like for files with the
> extent size hint attribute.  We really shouldn't micro-manage anything
> but failure cases with unlikely.
> 
> Additionally Arnd Bergmann recently reported that one of these two
> unlikely annotations causes link failures together with an upcoming
> kernel instrumentation patch, so let's get rid of it ASAP.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Queued up for -rc6;
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/libxfs/xfs_bmap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index ab82dd4..bfc00de 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 (align) {
>  		error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
>  						align, 0, ap->eof, 0, ap->conv,
>  						&ap->offset, &ap->length);
> @@ -3701,7 +3701,7 @@ xfs_bmap_btalloc(
>  		args.minlen = ap->minlen;
>  	}
>  	/* apply extent size hints if obtained earlier */
> -	if (unlikely(align)) {
> +	if (align) {
>  		args.prod = align;
>  		if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
>  			args.mod = (xfs_extlen_t)(args.prod - args.mod);
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-25 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 16:56 [PATCH] xfs: extsize hints are not unlikely in xfs_bmap_btalloc Christoph Hellwig
2017-01-25 16:59 ` Darrick J. Wong

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).