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: <20140731155703.a8bc3b77af913c8b3a63090a@linux-foundation.org>
Date:	Thu, 31 Jul 2014 15:57:03 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Gioh Kim <gioh.kim@....com>
Cc:	'김준수' <iamjoonsoo.kim@....com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Minchan Kim <minchan@...nel.org>,
	Laura Abbott <lauraa@...eaurora.org>,
	Michal Nazarewicz <mina86@...a86.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	????????? <gunho.lee@....com>,
	"'Chanho Min'" <chanho.min@....com>
Subject: Re: [PATCHv2] CMA/HOTPLUG: clear buffer-head lru before page
 migration

On Thu, 31 Jul 2014 11:22:35 +0900 Gioh Kim <gioh.kim@....com> wrote:

> The previous PATCH inserts invalidate_bh_lrus() only into CMA code.
> HOTPLUG needs also dropping bh of lru.
> So v2 inserts invalidate_bh_lrus() into both of CMA and HOTPLUG.
> 
> 
> ---------------------------- 8< ----------------------------
> The bh must be free to migrate a page at which bh is mapped.
> The reference count of bh is increased when it is installed
> into lru so that the bh of lru must be freed before migrating the page.
> 
> This frees every bh of lru. We could free only bh of migrating page.
> But searching lru sometimes costs more than invalidating entire lru.
> 
> Signed-off-by: Gioh Kim <gioh.kim@....com>
> Acked-by: Michal Nazarewicz <mina86@...a86.com>
> ---
>  mm/memory_hotplug.c |    1 +
>  mm/page_alloc.c     |    2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index a3797d3..1c5454f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1672,6 +1672,7 @@ repeat:
>                 lru_add_drain_all();
>                 cond_resched();
>                 drain_all_pages();
> +               invalidate_bh_lrus();

Both of these calls should have a comment explaining why
invalidate_bh_lrus() is being called.

>         }
> 
>         pfn = scan_movable_pages(start_pfn, end_pfn);
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b99643d4..c00dedf 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6369,6 +6369,8 @@ int alloc_contig_range(unsigned long start, unsigned long end,
>         if (ret)
>                 return ret;
> 
> +       invalidate_bh_lrus();
> +
>         ret = __alloc_contig_migrate_range(&cc, start, end);
>         if (ret)
>                 goto done;

I do feel that this change is likely to be beneficial, but I don't want
to apply such a patch until I know what its effects are upon all
alloc_contig_range() callers.  Especially hugetlb.
--
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