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: <20070420110244.GB12075@skynet.ie>
Date:	Fri, 20 Apr 2007 12:02:44 +0100
From:	mel@...net.ie (Mel Gorman)
To:	Christoph Lameter <clameter@....com>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Nick Piggin <nickpiggin@...oo.com.au>, Andi Kleen <ak@...e.de>,
	Paul Jackson <pj@....com>, Dave Chinner <dgc@....com>
Subject: Re: [RFC 3/8] Flushing and zeroing higher order page cache pages

On (19/04/07 09:35), Christoph Lameter didst pronounce:
> ---
>  include/linux/pagemap.h |   27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> Index: linux-2.6.21-rc7/include/linux/pagemap.h
> ===================================================================
> --- linux-2.6.21-rc7.orig/include/linux/pagemap.h	2007-04-18 22:08:36.000000000 -0700
> +++ linux-2.6.21-rc7/include/linux/pagemap.h	2007-04-18 22:09:13.000000000 -0700
> @@ -210,6 +210,33 @@ static inline void wait_on_page_writebac
>  
>  extern void end_page_writeback(struct page *page);
>  
> +/* Support for clearing higher order pages */
> +static inline void clear_mapping_page(struct address_space *a,
> +						struct page *page)
> +{
> +	int nr_pages = 1 << a->order;
> +	int i;
> +
> +	for (i = 0; i < nr_pages; i++)
> +		clear_highpage(page + i);
> +}

While this looks fine, it seems that clear_huge_page() and
clear_mapping_page() could share a common helper. I also note that
clear_huge_page() calls cond_reched() and this doesn't which may be the
type of different behavior we want to avoid.

That said, if this goes ahead, it might be an excuse to look at using
ramfs as the basis for hugetlbfs instead of it's current approach. I
believe using ramfs for hugepages is something that wli wants anyway.

> +
> +/*
> + * Support for flushing higher order pages.
> + *
> + * A bit stupid: On many platforms flushing the first page
> + * will flush any TLB starting there
> + */
> +static inline void flush_mapping_page(struct address_space *a,
> +						struct page *page)
> +{
> +	int nr_pages = 1 << a->order;
> +	int i;
> +
> +	for (i = 0; i < nr_pages; i++)
> +		flush_dcache_page(page + i);
> +}
> +
>  /*
>   * Fault a userspace page into pagetables.  Return non-zero on a fault.
>   *

I suppose I'll see where this is used later in the patchset. It might be
easier to review if these helpers are introduced at the point they are
used.Not super-sure


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

-- 
-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
-
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