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] [day] [month] [year] [list]
Date:	Sat, 30 Nov 2013 14:12:56 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	'谭姝' <shu.tan@...sung.com>
Subject: RE: [f2fs-dev] [PATCH] f2fs: readahead contiguous pages for
 restore_node_summary

Hi,

[snip]
> > > So how about add all pages of page list to node_inode's address space by
> > > add_to_page_cache_lru() with arg sum_entry->nid?
> > 
> > I don't think it's proper way to use add_to_page_cache_lru() directly.
> 
> This is the way used in VM readahead(i.e. read_pages/mpage_readpages/
> read_cache_pages).
> So what you worry about is that using lonely add_to_page_cache_lru()
> may cause exception, is it?

Right, what I meant was that, IMO, we should avoid copy and paste MM
codes, but use its wrappers, exported symbols, as much as possible.

> > > > > >
> > > > > > So how about writing ra_node_pages() which use the node_inode's page
> > > > > > cache?
> > > > >
> > > > > Hmm, so ra_node_pages is introduced for read node_inode's pages which are
> > > > > logical contiguously? and it also could take place of ra_node_page?
> > > >
> > > > Ah. The ra_node_page() read a node page ahead for a given node id.
> > > > So it doesn't match exactly between ra_node_page() and ra_node_pages()
> > > > that I suggested.
> > > > So how about reading node pages and then caching some of them in the
> > > > page cache, node_inode's address space?
> > >
> > > Got it,
> > > If we do not use the method above, we should search the NAT for nid number
> > > as the index of node_inode's page by the specified node page blkaddr, that costs
> > > a lot.
> > > How do you think?
> > 
> > 1. grab_cache_page(node_footer->nid);
> > 2. memcpy();
> > 3. SetPageUptodate();
> > 4. f2fs_put_page();
> 
> It could be.
> 
> This make ra_node_pages() synchronized, because we should read node_footer->nid
> from updated node page before we cache node pages, and we will still use page list to
> pass the updated page.
> 
> Why not introduce f2fs_cache_node_pages() include your code to cache node pages after
> ra_node_pages()?

Ok, right.
I'll test again and then merge this patch. :)

-- 
Jaegeuk Kim
Samsung

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