mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: jaxboe@fusionio.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] block: make struct block_device cacheline_aligned
Date: Wed, 19 Sep 2012 11:50:59 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1209191148170.30172@file.rdu.redhat.com> (raw)
In-Reply-To: <x494nmu828c.fsf@segfault.boston.devel.redhat.com>



On Wed, 19 Sep 2012, Jeff Moyer wrote:

> Mikulas Patocka <mpatocka@redhat.com> writes:
> 
> > On Wed, 19 Sep 2012, Jeff Moyer wrote:
> >
> >> Jeff Moyer <jmoyer@redhat.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

  reply	other threads:[~2012-09-19 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 13:50 Jeff Moyer
2012-09-19 14:59 ` Jeff Moyer
2012-09-19 15:16   ` Mikulas Patocka
2012-09-19 15:24     ` Jeff Moyer
2012-09-19 15:50       ` Mikulas Patocka [this message]
2012-09-19 16:44         ` Jeff Moyer
2012-09-20  0:11           ` Mikulas Patocka
2012-09-19 15:32   ` Richard Kennedy

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=Pine.LNX.4.64.1209191148170.30172@file.rdu.redhat.com \
    --to=mpatocka@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@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 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®