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]
Date:	Tue, 29 Nov 2011 15:45:03 +0100
From:	Jan Kara <jack@...e.cz>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/9] readahead: tag metadata call sites

On Tue 29-11-11 21:09:05, Wu Fengguang wrote:
> We may be doing more metadata readahead in future.
> 
> Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
  Looks OK.
Acked-by: Jan Kara <jack@...e.cz>

								Honza
> ---
>  fs/ext3/dir.c      |    1 +
>  fs/ext4/dir.c      |    1 +
>  include/linux/fs.h |    1 +
>  mm/readahead.c     |    1 +
>  4 files changed, 4 insertions(+)
> 
> --- linux-next.orig/fs/ext3/dir.c	2011-11-29 09:48:49.000000000 +0800
> +++ linux-next/fs/ext3/dir.c	2011-11-29 10:13:13.000000000 +0800
> @@ -136,6 +136,7 @@ static int ext3_readdir(struct file * fi
>  			pgoff_t index = map_bh.b_blocknr >>
>  					(PAGE_CACHE_SHIFT - inode->i_blkbits);
>  			if (!ra_has_index(&filp->f_ra, index))
> +				filp->f_ra.for_metadata = 1;
>  				page_cache_sync_readahead(
>  					sb->s_bdev->bd_inode->i_mapping,
>  					&filp->f_ra, filp,
> --- linux-next.orig/fs/ext4/dir.c	2011-11-29 09:48:49.000000000 +0800
> +++ linux-next/fs/ext4/dir.c	2011-11-29 10:13:13.000000000 +0800
> @@ -153,6 +153,7 @@ static int ext4_readdir(struct file *fil
>  			pgoff_t index = map.m_pblk >>
>  					(PAGE_CACHE_SHIFT - inode->i_blkbits);
>  			if (!ra_has_index(&filp->f_ra, index))
> +				filp->f_ra.for_metadata = 1;
>  				page_cache_sync_readahead(
>  					sb->s_bdev->bd_inode->i_mapping,
>  					&filp->f_ra, filp,
> --- linux-next.orig/include/linux/fs.h	2011-11-29 10:13:08.000000000 +0800
> +++ linux-next/include/linux/fs.h	2011-11-29 10:13:13.000000000 +0800
> @@ -948,6 +948,7 @@ struct file_ra_state {
>  	u16 mmap_miss;			/* Cache miss stat for mmap accesses */
>  	u8 pattern;			/* one of RA_PATTERN_* */
>  	unsigned int for_mmap:1;	/* readahead for mmap accesses */
> +	unsigned int for_metadata:1;	/* readahead for meta data */
>  
>  	loff_t prev_pos;		/* Cache last read() position */
>  };
> --- linux-next.orig/mm/readahead.c	2011-11-29 10:13:08.000000000 +0800
> +++ linux-next/mm/readahead.c	2011-11-29 10:13:13.000000000 +0800
> @@ -268,6 +268,7 @@ unsigned long ra_submit(struct file_ra_s
>  					ra->start, ra->size, ra->async_size);
>  
>  	ra->for_mmap = 0;
> +	ra->for_metadata = 0;
>  	return actual;
>  }
>  
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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