Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375504
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Anshuman Khandual <khandual@linux.vnet.ibm.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race |
| Date | Mon, 11 Apr 2016 07:50:02 +0200 |
| Message-ID | <rmCTw-LE-3@gated-at.bofh.it> (permalink) |
| References | <rlaPD-7AE-3@gated-at.bofh.it> <rlaPD-7AE-7@gated-at.bofh.it> <rleqf-1G9-27@gated-at.bofh.it> |
| X-Ibm-Helo | d28relay01.in.ibm.com |
| X-Ibm-Mailfrom | khandual@linux.vnet.ibm.com |
| X-Ibm-Rcptto | linux-kernel@vger.kernel.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Tm-As-Mml | disable |
| X-Cbid | 16041105-0005-0000-0000-00000BDA5A35 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | hughd@google.com, dave.hansen@intel.com, aneesh.kumar@linux.vnet.ibm.com, kirill@shutemov.name, n-horiguchi@ah.jp.nec.com, mgorman@techsingularity.net, akpm@linux-foundation.org |
| X-Original-Date | Mon, 11 Apr 2016 11:09:35 +0530 |
| X-Original-Message-ID | <570B3897.6040804@linux.vnet.ibm.com> |
| X-Original-References | <1460007464-26726-1-git-send-email-khandual@linux.vnet.ibm.com> <1460007464-26726-4-git-send-email-khandual@linux.vnet.ibm.com> <570627C9.5030105@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1375504 |
Show key headers only | View raw
On 04/07/2016 02:56 PM, Balbir Singh wrote:
>
> On 07/04/16 15:37, Anshuman Khandual wrote:
>> > follow_huge_(pmd|pud|pgd) functions are used to walk the page table and
>> > fetch the page struct during 'follow_page_mask' call. There are possible
>> > race conditions faced by these functions which arise out of simultaneous
>> > calls of move_pages() and freeing of huge pages. This was fixed partly
>> > by the previous commit e66f17ff7177 ("mm/hugetlb: take page table lock
>> > in follow_huge_pmd()") for only PMD based huge pages.
>> >
>> > After implementing similar logic, functions like follow_huge_(pud|pgd)
>> > are now safe from above mentioned race conditions and also can support
>> > FOLL_GET. Generic version of the function 'follow_huge_addr' has been
>> > left as it is and its upto the architecture to decide on it.
>> >
>> > Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>> > ---
>> > include/linux/mm.h | 33 +++++++++++++++++++++++++++
>> > mm/hugetlb.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++--------
>> > 2 files changed, 91 insertions(+), 9 deletions(-)
>> >
>> > diff --git a/include/linux/mm.h b/include/linux/mm.h
>> > index ffcff53..734182a 100644
>> > --- a/include/linux/mm.h
>> > +++ b/include/linux/mm.h
>> > @@ -1751,6 +1751,19 @@ static inline void pgtable_page_dtor(struct page *page)
>> > NULL: pte_offset_kernel(pmd, address))
>> >
>> > #if USE_SPLIT_PMD_PTLOCKS
> Do we still use USE_SPLIT_PMD_PTLOCKS? I think its good enough. with pgd's
> we are likely to use the same locks and the split nature may not be really
> split.
>
Sorry Balbir, did not get what you asked. Can you please elaborate on
this ?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-04-07 07:40 +0200
Re: [PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race Balbir Singh <bsingharora@gmail.com> - 2016-04-07 11:30 +0200
Re: [PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-04-11 07:50 +0200
Re: [PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race Balbir Singh <bsingharora@gmail.com> - 2016-04-11 14:50 +0200
csiph-web