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]
Message-ID: <CAPQyPG5bWCQ5TDau-s1DLv5zT0VN92+nv7+VHiPqgeGEum-f9w@mail.gmail.com>
Date:	Tue, 8 Nov 2011 00:13:14 +0800
From:	Nai Xia <nai.xia@...il.com>
To:	Andrea Arcangeli <aarcange@...hat.com>
Cc:	Hugh Dickins <hughd@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Pawel Sikora <pluto@...k.net>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	jpiszcz@...idpixels.com, arekm@...-linux.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mremap: skip page table lookup for non-faulted anonymous VMAs

On Mon, Nov 7, 2011 at 11:32 PM, Andrea Arcangeli <aarcange@...hat.com> wrote:
> On Mon, Nov 07, 2011 at 12:21:35PM +0800, Nai Xia wrote:
>> If an anonymous vma has not yet been faulted, move_page_tables() in move_vma()
>> is not necessary for it.
>
> I actually thought of adding that (in fact fork has it and it's more
> likely to be beneficial for fork than for mremap I suspect), but this
> adds a branch to the fast path for a case that shouldn't normally
> materialize. So I don't think it's worth adding it as I expect it to
> add overhead in average.
>

Well, it seems like I forgot to embrace it with unlikely(), with instr
prefetching  this line seems a trivial even for the average cases.

But in case it really materializes, it may avoid tedious page table
locking and pmd allocation and furthermore, a semantically
confusing operation of move_page_tables() on a same VMA.

Anyway, it's not a big deal, indeed. You are the maintainers,
it's left for you to decide.
--
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