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:	Mon, 03 Jun 2013 08:53:14 -0700
From:	Dave Hansen <dave@...1.net>
To:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
CC:	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Hugh Dickins <hughd@...gle.com>,
	Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
	Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
	Andi Kleen <ak@...ux.intel.com>,
	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Hillf Danton <dhillf@...il.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 23/39] thp: wait_split_huge_page(): serialize over i_mmap_mutex
 too


On 06/03/2013 08:02 AM, Kirill A. Shutemov wrote:
> Dave Hansen wrote:
>> On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote:
>>> From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com
>>> -#define wait_split_huge_page(__anon_vma, __pmd)				\
>>> +#define wait_split_huge_page(__vma, __pmd)				\
>>>  	do {								\
>>>  		pmd_t *____pmd = (__pmd);				\
>>> -		anon_vma_lock_write(__anon_vma);			\
>>> -		anon_vma_unlock_write(__anon_vma);			\
>>> +		struct address_space *__mapping =			\
>>> +					vma->vm_file->f_mapping;	\
>>> +		struct anon_vma *__anon_vma = (__vma)->anon_vma;	\
>>> +		if (__mapping)						\
>>> +			mutex_lock(&__mapping->i_mmap_mutex);		\
>>> +		if (__anon_vma) {					\
>>> +			anon_vma_lock_write(__anon_vma);		\
>>> +			anon_vma_unlock_write(__anon_vma);		\
>>> +		}							\
>>> +		if (__mapping)						\
>>> +			mutex_unlock(&__mapping->i_mmap_mutex);		\
>>>  		BUG_ON(pmd_trans_splitting(*____pmd) ||			\
>>>  		       pmd_trans_huge(*____pmd));			\
>>>  	} while (0)
...
>> Could you also describe the lengths to which you've gone to try and keep
>> this macro from growing in to any larger of an abomination.  Is it truly
>> _impossible_ to turn this in to a normal function?  Or will it simply be
>> a larger amount of work that you can do right now?  What would it take?
> 
> Okay, I've tried once again. The patch is below. It looks too invasive for
> me. What do you think?

That patch looks great to me, actually.  It really looks to just be
superficially moving code around.  The diffstat is even too:

>  include/linux/huge_mm.h  |   35 ++++++++++++++--------------
>  include/linux/mm.h       |   24 +++++++++++++++++--
>  include/linux/mm_types.h |   37 +++++++++++++++++++++++++++++
>  include/linux/rmap.h     |   58 -----------------------------------------------
>  mm/memory.c              |    8 +++---
>  5 files changed, 81 insertions(+), 81 deletions(-)

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