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: <CACz4_2c6+EgTLrybF=bFsK_ra-nNgb46PFuXZA4CT1AfKFf=ug@mail.gmail.com>
Date:	Tue, 15 Oct 2013 11:49:17 -0700
From:	Ning Qu <quning@...gle.com>
To:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	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 <willy@...ux.intel.com>,
	Hillf Danton <dhillf@...il.com>, Dave Hansen <dave@...1.net>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/12] mm, thp, tmpfs: request huge page in shm_fault when needed

Will fix this.
Best wishes,
-- 
Ning Qu (曲宁) | Software Engineer | quning@...gle.com | +1-408-418-6066


On Tue, Oct 15, 2013 at 3:37 AM, Kirill A. Shutemov
<kirill.shutemov@...ux.intel.com> wrote:
> Ning Qu wrote:
>> Add the function to request huge page in shm_fault when needed.
>> And it will fall back to regular page if huge page can't be
>> satisfied or allocated.
>>
>> If small page requested but huge page is found, the huge page will
>> be splitted.
>>
>> Signed-off-by: Ning Qu <quning@...il.com>
>> ---
>>  mm/shmem.c | 32 +++++++++++++++++++++++++++++---
>>  1 file changed, 29 insertions(+), 3 deletions(-)
>>
>> diff --git a/mm/shmem.c b/mm/shmem.c
>> index 68a0e1d..2fc450d 100644
>> --- a/mm/shmem.c
>> +++ b/mm/shmem.c
>> @@ -1472,19 +1472,45 @@ unlock:
>>  static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
>>  {
>>       struct inode *inode = file_inode(vma->vm_file);
>> +     struct page *page = NULL;
>>       int error;
>>       int ret = VM_FAULT_LOCKED;
>>       gfp_t gfp = mapping_gfp_mask(inode->i_mapping);
>> -
>> -     error = shmem_getpage(inode, vmf->pgoff, &vmf->page, SGP_CACHE, gfp,
>> -                             0, &ret);
>> +     bool must_use_thp = vmf->flags & FAULT_FLAG_TRANSHUGE;
>> +     int flags = 0;
>> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE_PAGECACHE
>> +     flags |= AOP_FLAG_TRANSHUGE;
>> +#endif
>
> ifdef is not needed: shmem_getpage will ignore AOP_FLAG_TRANSHUGE if
> CONFIG_TRANSPARENT_HUGEPAGE_PAGECACHE is not defined.
>
> --
>  Kirill A. Shutemov
--
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