From: Jens Axboe <axboe@fb.com>
To: Jan Kara <jack@suse.cz>
Cc: <linux-fsdevel@vger.kernel.org>, <elliott@hp.com>
Subject: Re: [PATCH] bio: skip atomic inc/dec of ->bi_remaining for non-chains
Date: Mon, 20 Apr 2015 10:42:13 -0600 [thread overview]
Message-ID: <55352C65.4070805@fb.com> (raw)
In-Reply-To: <20150420160446.GL17020@quack.suse.cz>
On 04/20/2015 10:04 AM, Jan Kara wrote:
> On Fri 17-04-15 08:59:33, Jens Axboe wrote:
>> @@ -292,8 +292,8 @@ void bio_reset(struct bio *bio)
>> __bio_free(bio);
>>
>> memset(bio, 0, BIO_RESET_BYTES);
>> - bio->bi_flags = flags|(1 << BIO_UPTODATE);
>> - atomic_set(&bio->bi_remaining, 1);
>> + bio->bi_flags = flags | 1 << BIO_UPTODATE;
> Although this is correct, I'd prefer to keep parenthesis around 1 <<
> BIO_UPTODATE. Maybe I'm not a real C hacker but I had to lookup the
> operator precedence of | vs << :).
Heh, I think we can safely say you are a real C hacker, lets just keep
the parenthesis if that makes it easier to read/verify.
> Otherwise the patch looks good to me (but I'm not an expert in this area, I
> just looked into the patch by accident because I thought it's another
> respin of your direct IO patch ;).
It's a parallel effort, getting rid of the atomics where we can...
Thanks for looking at it, can I add your reviewed-by tag with the
parenthesis change?
--
Jens Axboe
next prev parent reply other threads:[~2015-04-20 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 14:59 [PATCH] bio: skip atomic inc/dec of ->bi_remaining for non-chains Jens Axboe
2015-04-20 16:04 ` Jan Kara
2015-04-20 16:42 ` Jens Axboe [this message]
2015-04-21 9:04 ` Jan Kara
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=55352C65.4070805@fb.com \
--to=axboe@fb.com \
--cc=elliott@hp.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.