From: Dan Carpenter <dan.carpenter@oracle.com>
To: Gao Xiang <gaoxiang25@huawei.com>
Cc: Chao Yu <chao@kernel.org>,
devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
Chao Yu <yuchao0@huawei.com>,
linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] staging: erofs: add error handling for xattr submodule
Date: Mon, 13 Aug 2018 15:40:14 +0300 [thread overview]
Message-ID: <20180813124014.iivbtjrsdv5odnuu@mwanda> (raw)
In-Reply-To: <c14184af-6378-fd96-3b9b-52c9a7da8463@huawei.com>
On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
> >> @@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode, struct getxattr_iter *it)
> >> ret = xattr_foreach(&it->it, &find_xattr_handlers, &remaining);
> >> if (ret >= 0)
> >> break;
> >> +
> >> + if (unlikely(ret != -ENOATTR)) /* -ENOMEM, -EIO, etc. */
> >
> > I have held off commenting on all the likely/unlikely annotations we
> > are adding because I don't know what the fast paths are in this code.
> > However, this is clearly an error path here, not on a fast path.
> >
> > Generally the rule on likely/unlikely is that they hurt readability so
> > we should only add them if it makes a difference in benchmarking.
> >
>
> In my opinion, return values other than 0 and ENOATTR(ENODATA) rarely happens,
> it should be in the slow path...
>
What I'm trying to say is please stop adding so many likely/unlikely
annotations. You should only add them if you have the benchmark data to
show the it really is required.
regards,
dan carpenter
next prev parent reply other threads:[~2018-08-13 12:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-12 14:01 [PATCH 0/8] staging: erofs: fix some issues and clean up codes Chao Yu
2018-08-12 14:01 ` [PATCH 1/8] staging: erofs: introduce erofs_grab_bio Chao Yu
2018-08-12 14:01 ` [PATCH 2/8] staging: erofs: separate erofs_get_meta_page Chao Yu
2018-08-13 11:04 ` Dan Carpenter
2018-08-13 11:23 ` Gao Xiang
2018-08-13 12:34 ` Chao Yu
2018-08-12 14:01 ` [PATCH 3/8] staging: erofs: add error handling for xattr submodule Chao Yu
2018-08-13 2:00 ` Chao Yu
2018-08-13 2:36 ` Gao Xiang
2018-08-13 2:56 ` [PATCH v2 " Gao Xiang
2018-08-13 8:15 ` [PATCH " Chao Yu
2018-08-13 11:47 ` Dan Carpenter
2018-08-13 12:17 ` Gao Xiang
2018-08-13 12:25 ` Dan Carpenter
2018-08-13 13:40 ` Gao Xiang
2018-08-13 13:50 ` Dan Carpenter
2018-08-13 12:40 ` Dan Carpenter [this message]
2018-08-13 12:46 ` Gao Xiang
2018-08-13 12:46 ` Chao Yu
2018-08-12 14:01 ` [PATCH 4/8] staging: erofs: cleanup z_erofs_vle_work_{lookup, register} Chao Yu
2018-08-13 12:00 ` Dan Carpenter
2018-08-13 12:37 ` Gao Xiang
2018-08-13 13:05 ` Dan Carpenter
2018-08-13 13:19 ` Gao Xiang
2018-08-12 14:01 ` [PATCH 5/8] staging: erofs: rearrange vle clustertype definitions Chao Yu
2018-08-12 14:01 ` [PATCH 6/8] staging: erofs: fix vle_decompressed_index_clusterofs Chao Yu
2018-08-13 12:03 ` Dan Carpenter
2018-08-13 13:01 ` Gao Xiang
2018-08-12 14:01 ` [PATCH 7/8] staging: erofs: fix integer overflow on 32-bit platform Chao Yu
2018-08-12 14:01 ` [PATCH 8/8] staging: erofs: fix compression mapping beyond EOF Chao Yu
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=20180813124014.iivbtjrsdv5odnuu@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chao@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gaoxiang25@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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
all inboxes | Powered by JetHome®