From: Jaegeuk Kim <jaegeuk.kim@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: 김재극 <jaegeuk.kim@samsung.com>,
viro@zeniv.linux.org.uk, "'Theodore Ts'o'" <tytso@mit.edu>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
chur.lee@samsung.com, cm224.lee@samsung.com,
jooyoung.hwang@samsung.com
Subject: Re: [PATCH 02/16] f2fs: add on-disk layout
Date: Sat, 13 Oct 2012 20:39:48 +0900 [thread overview]
Message-ID: <1350128388.1917.1.camel@kjgkr> (raw)
In-Reply-To: <1557307.tHJJu7g4Ig@wuerfel>
2012-10-12 (금), 21:05 +0000, Arnd Bergmann:
> On Friday 05 October 2012 20:56:44 김재극 wrote:
> > +struct f2fs_nat_entry {
> > + __u8 version;
> > + __le32 ino;
> > + __le32 block_addr;
> > +} __packed;
> > +
> > +struct f2fs_nat_block {
> > + struct f2fs_nat_entry entries[NAT_ENTRY_PER_BLOCK];
> > +} __packed;
>
> Using "__packed" on structure is rather inefficient on CPU architectures
> that cannot do aligned accesses. I would suggest you remove this
> attribute everywhere you can. The f2fs_nat_entry is particularly
> suboptimal because it is 9 bytes long, and I'm not sure if this
> can be reasonably changed to a multiple of four.
>
> In all other cases, you should try to lay out the structures
> so that each member is naturally aligned and you don't need any __packed
> attributes, in particular for those that are accessed a lot.
>
Ok, I'll check all the in-memory data structures.
Thank you for comments.
> Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jaegeuk Kim
Samsung
prev parent reply other threads:[~2012-10-13 11:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 11:56 김재극
2012-10-05 17:46 ` Martin Steigerwald
2012-10-06 18:25 ` Jaegeuk Kim
2012-10-05 17:54 ` Dan Luedtke
2012-10-05 21:09 ` Boaz Harrosh
2012-10-06 18:19 ` Jaegeuk Kim
2012-10-06 22:21 ` David Sterba
2012-10-09 5:27 ` Chul Lee
2012-10-07 6:42 ` Stefan Hajnoczi
2012-10-10 5:52 ` Jaegeuk Kim
2012-10-12 21:05 ` Arnd Bergmann
2012-10-13 11:39 ` Jaegeuk Kim [this message]
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=1350128388.1917.1.camel@kjgkr \
--to=jaegeuk.kim@gmail.com \
--cc=arnd@arndb.de \
--cc=chur.lee@samsung.com \
--cc=cm224.lee@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jaegeuk.kim@samsung.com \
--cc=jooyoung.hwang@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome