From: "bfields@fieldses.org" <bfields@fieldses.org>
To: Jeff Layton <jlayton@poochiereds.net>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
"cluster-devel@redhat.com" <cluster-devel@redhat.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"fuse-devel@lists.sourceforge.net"
<fuse-devel@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"HPDD-discuss@lists.01.org" <HPDD-discuss@lists.01.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"ocfs2-devel@oss.oracle.com" <ocfs2-devel@oss.oracle.com>
Subject: Re: [HPDD-discuss] [PATCH] nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations
Date: Wed, 16 Sep 2015 17:30:44 -0400 [thread overview]
Message-ID: <20150916213044.GB5169@fieldses.org> (raw)
In-Reply-To: <20150916131829.6cbf5657@tlielax.poochiereds.net>
On Wed, Sep 16, 2015 at 01:18:29PM -0400, Jeff Layton wrote:
> On Mon, 14 Sep 2015 12:10:15 -0400
> "bfields@fieldses.org" <bfields@fieldses.org> wrote:
>
> > On Sat, Sep 12, 2015 at 06:24:54AM -0400, Jeff Layton wrote:
> > > I don't think it matters, at least not on x86_64. bools and chars both
> > > require a byte. pahole does show this adding a new hole, but that's
> > > just because this brings the code up to 5 flags and the next field
> > > (fh_pre_size) needs to be aligned.
> > >
> > > I do agree that replacing those other unsigned chars with bools is more
> > > clear however. Maybe we should even replace them all with a single
> > > unsigned int and use bitops to set flags in there. That would be more
> > > space efficient now that we're at 5 flags.
> >
> > Makes sense to me.--b.
>
> I played around with this a little today, and it turns out not to make
> a lot of difference. Here's what pahole says about the existing code
> (once I moved fh_maxsize to snuggle up to fh_handle to plug a hole):
...
> I used an unsigned long for fh_flags since we might as well. Making it
> smaller just adds a hole in there since the compiler wants to align the
> fh_pre_size. Moving it around doesn't help either as it just moves the
> hole around. Note that this is x86_64. It might look different on a
> 32-bit arch, but I doubt it really matters much in the big scheme of
> things.
>
> Bruce, I'll send out the patches that change this if you like, but I'm
> inclined to just leave this alone since it doesn't seem to have a
> tangible benefit.
Unless more flags are imminent I guess it's just a question of which is
more readable. Arguably there's some value to making it more obvious
that these are each just a bit. I'll accept your judgement on that
question.
--b.
next prev parent reply other threads:[~2015-09-16 21:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 10:20 [PATCH] nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations Jeff Layton
2015-09-11 21:29 ` J. Bruce Fields
[not found] ` <20150911212957.GH11677-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2015-09-11 21:44 ` Jeff Layton
[not found] ` <1441966830-5517-1-git-send-email-jeff.layton-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
2015-09-12 4:41 ` [HPDD-discuss] " Dilger, Andreas
[not found] ` <D21906EE.10A741%andreas.dilger-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-12 10:24 ` Jeff Layton
2015-09-14 16:10 ` bfields
2015-09-16 17:18 ` Jeff Layton
2015-09-16 21:30 ` bfields [this message]
[not found] ` <20150916213044.GB5169-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2015-09-16 22:04 ` Jeff Layton
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=20150916213044.GB5169@fieldses.org \
--to=bfields@fieldses.org \
--cc=HPDD-discuss@lists.01.org \
--cc=andreas.dilger@intel.com \
--cc=ceph-devel@vger.kernel.org \
--cc=cluster-devel@redhat.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=jlayton@poochiereds.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).