[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1209191148170.30172@file.rdu.redhat.com>
Date: Wed, 19 Sep 2012 11:50:59 -0400 (EDT)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Jeff Moyer <jmoyer@...hat.com>
cc: jaxboe@...ionio.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch] block: make struct block_device cacheline_aligned
On Wed, 19 Sep 2012, Jeff Moyer wrote:
> Mikulas Patocka <mpatocka@...hat.com> writes:
>
> > On Wed, 19 Sep 2012, Jeff Moyer wrote:
> >
> >> Jeff Moyer <jmoyer@...hat.com> writes:
> >>
> >> > Hi,
> >> >
> >> > When testing against a pcie ssd or a ramdisk, making the block device
> >> > structure cacheline_aligned provided a significant increase in
> >> > performance:
> >>
> >> Self-NACK on this one. This results in a ton of warnings:
> >>
> >> include/linux/fs.h:727: warning: ???__section__??? attribute does not
> >> apply to types
> >> In file included from include/linux/debugfs.h:18,
> >> from kernel/trace/trace_probe.h:28,
> >> from kernel/trace/trace_kprobe.c:23:
> >> include/linux/fs.h:727: warning: ???__section__??? attribute does not
> >> apply to types
> >>
> >> And that leaves me with the task of figuring out if/why this actually
> >> helps.
> >>
> >> Cheers,
> >> Jeff
> >
> > Hi
> >
> > Use ____cacheline_aligned instead of __cacheline_aligned
>
> struct block_device is allocated as part of the bdev_inode:
>
> struct bdev_inode {
> struct block_device bdev;
> struct inode vfs_inode;
> };
>
> The bdev_inode is allocated from the bdev_cachep, which uses
> SLAB_HWCACHE_ALIGN. So, in theory, this should already be aligned.
>
> -Jeff
The purpose here is to align vfs_inode. If you add alignment to bdev,
vfs_inode would be aligned (because bdev size would be aligned to
cacheline boundary). Or you can add the alignment to vfs_inode, it would
have the same effect.
Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists