lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <025001d07587$fe059d80$fa10d880$@cn.fujitsu.com>
Date:	Mon, 13 Apr 2015 09:20:11 +0800
From:	Zhao Lei <zhaolei@...fujitsu.com>
To:	"'Boaz Harrosh'" <boaz@...xistor.com>,
	"'Christoph Hellwig'" <hch@....de>
CC:	<linux-fsdevel@...r.kernel.org>, "'Jan Kara'" <jack@...e.cz>,
	"'Jens Axboe'" <axboe@...com>,
	"'LKML'" <linux-kernel@...r.kernel.org>
Subject: RE: Regression caused by using node_to_bdi()

Hi, Boaz

> -----Original Message-----
> From: Boaz Harrosh [mailto:boaz@...xistor.com]
> Sent: Sunday, April 12, 2015 10:39 PM
> To: Boaz Harrosh; Zhao Lei; 'Christoph Hellwig'
> Cc: linux-fsdevel@...r.kernel.org; 'Jan Kara'; 'Jens Axboe'; 'LKML'
> Subject: Re: Regression caused by using node_to_bdi()
> 
> On 04/12/2015 02:33 PM, Boaz Harrosh wrote:
> > On 04/10/2015 02:25 PM, Zhao Lei wrote:
> >> Hi, Christoph Hellwig
> >>
> <>
> >>
> >> Is there some way to speed up it(inline, or some access some variant
> >> in struct directly, ...)?
> >>
> >
> > Christoph hi
> >
> > Both node_to_bdi() and sb_is_blkdev_sb()  (and I_BDEV() &&
> > blk_get_backing_dev_info()) Are an exported function calls.
> >
> > Can we not make blockdev_superblock->s_bdi == NULL, and then
> > optimize-out the call to sb_is_blkdev_sb() to only that case.
> > Something like:
> >
> > ---
> >
> > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index
> > 32a8bbd..e0375e1 100644
> > --- a/fs/fs-writeback.c
> > +++ b/fs/fs-writeback.c
> > @@ -78,7 +78,7 @@ int writeback_in_progress(struct backing_dev_info
> > *bdi)  }  EXPORT_SYMBOL(writeback_in_progress);
> >
> > -struct backing_dev_info *inode_to_bdi(struct inode *inode)
> > +struct backing_dev_info *__inode_to_bdi(struct inode *inode)
> >  {
> >  	struct super_block *sb;
> >
> > @@ -92,7 +92,7 @@ struct backing_dev_info *inode_to_bdi(struct inode
> > *inode)  #endif
> >  	return sb->s_bdi;
> >  }
> > -EXPORT_SYMBOL_GPL(inode_to_bdi);
> > +EXPORT_SYMBOL_GPL(__inode_to_bdi);
> >
> >  static inline struct inode *wb_inode(struct list_head *head)  { diff
> > --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
> > index aff923a..7d172f5 100644
> > --- a/include/linux/backing-dev.h
> > +++ b/include/linux/backing-dev.h
> > @@ -107,7 +107,16 @@ struct backing_dev_info {  #endif  };
> >
> > -struct backing_dev_info *inode_to_bdi(struct inode *inode);
> > +struct backing_dev_info *__inode_to_bdi(struct inode *inode);
> > +
> > +static inline
> > +struct backing_dev_info *inode_to_bdi(struct inode *inode) {
> > +	if (!inode || !inode->i_sb)
> > +		return __inode_to_bdi(inode);
> > +
> > +	return inode->i_sb->s_bdi;
> > +}
> >
> 
> This patch actually boots. Lei could you please test to see if it fixes your
> slowness?
> 
Thanks, I'll test this patch.

Thanks
Zhaolei

> Thanks
> Boaz
> 
> >  int __must_check bdi_init(struct backing_dev_info *bdi);  void
> > bdi_destroy(struct backing_dev_info *bdi);
> >



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ