Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbcJZIt2 (ORCPT ); Wed, 26 Oct 2016 04:49:28 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44818 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753017AbcJZItV (ORCPT ); Wed, 26 Oct 2016 04:49:21 -0400 From: "Aneesh Kumar K.V" To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K.V" Subject: [PATCH 0/5] mmu gather changes Date: Wed, 26 Oct 2016 14:18:34 +0530 X-Mailer: git-send-email 2.10.1 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102608-0020-0000-0000-00000A1AFA46 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005981; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000188; SDB=6.00772924; UDB=6.00371059; IPR=6.00549750; BA=6.00004834; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013106; XFM=3.00000011; UTC=2016-10-26 08:49:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102608-0021-0000-0000-000056C02030 Message-Id: <20161026084839.27299-1-aneesh.kumar@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-26_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610260153 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1898 Lines: 42 Hi, With commit e77b0852b551 ("mm/mmu_gather: track page size with mmu gather and force flush if page size change") we added the ability to force a tlb flush when the page size change in a mmu_gather loop. We did that by checking for a page size change every time we added a page to mmu_gather for lazy flush/remove. This breaks when invalidating a range that contain dax mapping. Dax pte entries are considered special pte entries and the mmu_gather loop doesn't call tlb_remove_page for them. Hence the page size change check doesn't work when the invalidate range covers dax mappings. We can also improve the current code by moving the page size change check early and not doing it every time we add a page. This series is not a bug fix series, because only arch that use the page size change detail is ppc64 and we don't have dax enabled on that arch yet. The series also include code changes that improve code comments and add new helpers to makes it easy to follow. Aneesh Kumar K.V (5): mm: Use the correct page size when removing the page mm: Update mmu_gather range correctly mm/hugetlb: add tlb_remove_hugetlb_entry for handling hugetlb pages mm: Add tlb_remove_check_page_size_change to track page size change mm: Remove the page size change check in tlb_remove_page arch/arm/include/asm/tlb.h | 21 ++++++----- arch/ia64/include/asm/tlb.h | 25 +++++++------ arch/powerpc/include/asm/tlb.h | 16 ++++++++ arch/s390/include/asm/tlb.h | 14 ++++--- arch/sh/include/asm/tlb.h | 15 +++++--- arch/um/include/asm/tlb.h | 15 +++++--- include/asm-generic/tlb.h | 83 +++++++++++++++++++++++++----------------- mm/huge_memory.c | 8 +++- mm/hugetlb.c | 7 +++- mm/madvise.c | 1 + mm/memory.c | 28 ++++++-------- 11 files changed, 141 insertions(+), 92 deletions(-) -- 2.10.1