Received: by 10.223.185.116 with SMTP id b49csp3991141wrg; Mon, 26 Feb 2018 09:20:02 -0800 (PST) X-Google-Smtp-Source: AH8x226veIdtBDbLTMgMZ/X+688+rSCDpzuLU0Cz4llnrdJbj6vakFHqWicViPS8wCKjH51uiU/0 X-Received: by 2002:a17:902:bcc5:: with SMTP id o5-v6mr10845959pls.86.1519665601958; Mon, 26 Feb 2018 09:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519665601; cv=none; d=google.com; s=arc-20160816; b=WGurCEwqxqh9kmzdyaR7FFaVEzWRU0TxoVIdkuv5SIHFub9/8seJVKUh/A+lrBBRiV pxVPOgh36Scvit8Jh99xPhP/JDywiHAp2syPJ2bzWNa6Xz49xSQCke5YCC9tDSegchzt LK/fJ478xM+Ws2VazNgeAjtlmU87iwu+XQ+qaBu5y4aUUuDA/4p66SBAijzr3fC4rEtV YHox6cH45JRt99i6Z6pWSn8PX49Frr54RgSWaoRB46PznhK6KhaNqbJ92xZatiufYdnP WSa76rvQumYkDcsGBQvWx7dZuGSvBArBppGQXKw8qjIgcQvYG0jlxSuSHuLr9F7fyv2i s4VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3KUygSq/VptHIChECmsZehuv9O9mv/H8jl5jpsuK9jM=; b=EgIocXeDmQoaDQpp6UIJq9bspzGRi+6gcNukPw5x4hCJEW/tPk/zyHwKr7ZU/7ujJB 1IIJ/lOgup4DwFxKynNjSL2uwxJ1N4AHm40Jj3rnF7Fwql4BcC6i1+Z54VcXSNGKi0OF eN9QfR//lBqclLGPGABfN+ThNdS+kCdHwESSbbYWhqPFQ8y6ZLZw6MW+ikQ6g3sIr5S/ ioEjI+j1pY5A+O37m2Ue8NOKTIB0/6kF6VwKvHnWiqEKWCexDz+gdfvJe9Kz39lihVMu VfETLKJDyzcpEYyxgV+7tDg/pD1SNixtpFC25U3GKBL/14hhpmYp+NlsrqLeuy9DSmEu im2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=XWYB8lGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m62si5723649pga.507.2018.02.26.09.19.45; Mon, 26 Feb 2018 09:20:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=XWYB8lGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbeBZRSo (ORCPT + 99 others); Mon, 26 Feb 2018 12:18:44 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:48574 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbeBZRSn (ORCPT ); Mon, 26 Feb 2018 12:18:43 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1QHCHxE014443; Mon, 26 Feb 2018 17:16:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=3KUygSq/VptHIChECmsZehuv9O9mv/H8jl5jpsuK9jM=; b=XWYB8lGmxnHWK6uHrIGiBwGvj5G/5w71z9a6BLlJNc2PvovdF5FRjQCkJ4bYCFxhykFj jCVumcEGLK6HPhAdCTR8Z8JLoxFECoyKoiYnzReQFBRUGiNjhqDhPxGrAho8E8/8agvM 8zTJh87UNBoWVldlceho/de3ibODmrKD5ZVZHHGdcGajof4pn/whDHVOyVKHxEvM8/xq OSCELjsN9unzGhckrtWtLjHbrWUkktdd8OKq/XYoa68goKP3z3YAXESX338EPrhWOo3G wv0XhXOlgb1lZ+bcRS1HURmS3Nv/qZHf3Z0rhd3YuItydnWZVxKVnYzrHiJLIm13npRF 6g== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2gcp1y86c0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Feb 2018 17:16:16 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w1QHGGrX021341 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Feb 2018 17:16:16 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w1QHGCRh004281; Mon, 26 Feb 2018 17:16:12 GMT Received: from [10.39.240.250] (/10.39.240.250) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Feb 2018 09:16:12 -0800 Subject: Re: [PATCH v8 18/24] mm: Provide speculative fault infrastructure To: Laurent Dufour , paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com, Daniel Jordan Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org References: <1518794738-4186-1-git-send-email-ldufour@linux.vnet.ibm.com> <1518794738-4186-19-git-send-email-ldufour@linux.vnet.ibm.com> From: Daniel Jordan Message-ID: <5b16d6ce-6b62-e4ca-2d78-c25bb008e27e@oracle.com> Date: Mon, 26 Feb 2018 12:16:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1518794738-4186-19-git-send-email-ldufour@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8816 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802260225 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, This series doesn't build for me[*] when CONFIG_TRANSPARENT_HUGEPAGE is unset. The problem seems to be that the BUILD_BUG() version of pmd_same is called in pte_map_lock: On 02/16/2018 10:25 AM, Laurent Dufour wrote: > +static bool pte_map_lock(struct vm_fault *vmf) > +{ ...snip... > + if (!pmd_same(pmdval, vmf->orig_pmd)) > + goto out; Since SPF can now call pmd_same without THP, maybe the way to fix it is just diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 2cfa3075d148..e130692db24a 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -375,7 +375,8 @@ static inline int pte_unused(pte_t pte) #endif #ifndef __HAVE_ARCH_PMD_SAME -#ifdef CONFIG_TRANSPARENT_HUGEPAGE +#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || \ + defined(CONFIG_SPECULATIVE_PAGE_FAULT) static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b) { return pmd_val(pmd_a) == pmd_val(pmd_b); ? Daniel [*] The errors are: In file included from /home/dmjordan/src/linux/include/linux/kernel.h:10:0, from /home/dmjordan/src/linux/include/linux/list.h:9, from /home/dmjordan/src/linux/include/linux/smp.h:12, from /home/dmjordan/src/linux/include/linux/kernel_stat.h:5, from /home/dmjordan/src/linux/mm/memory.c:41: In function ‘pmd_same.isra.104’, inlined from ‘pte_map_lock’ at /home/dmjordan/src/linux/mm/memory.c:2380:7: /home/dmjordan/src/linux/include/linux/compiler.h:324:38: error: call to ‘__compiletime_assert_391’ declared with attribute error: BUILD_BUG failed _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ /home/dmjordan/src/linux/include/linux/compiler.h:304:4: note: in definition of macro ‘__compiletime_assert’ prefix ## suffix(); \ ^~~~~~ /home/dmjordan/src/linux/include/linux/compiler.h:324:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/linux/build_bug.h:45:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/linux/build_bug.h:79:21: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") ^~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/asm-generic/pgtable.h:391:2: note: in expansion of macro ‘BUILD_BUG’ BUILD_BUG(); ^~~~~~~~~ CC block/elevator.o CC crypto/crypto_wq.o In function ‘pmd_same.isra.104’, inlined from ‘pte_spinlock’ at /home/dmjordan/src/linux/mm/memory.c:2326:7, inlined from ‘handle_pte_fault’ at /home/dmjordan/src/linux/mm/memory.c:4181:7: /home/dmjordan/src/linux/include/linux/compiler.h:324:38: error: call to ‘__compiletime_assert_391’ declared with attribute error: BUILD_BUG failed _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ /home/dmjordan/src/linux/include/linux/compiler.h:304:4: note: in definition of macro ‘__compiletime_assert’ prefix ## suffix(); \ ^~~~~~ /home/dmjordan/src/linux/include/linux/compiler.h:324:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/linux/build_bug.h:45:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/linux/build_bug.h:79:21: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") ^~~~~~~~~~~~~~~~ /home/dmjordan/src/linux/include/asm-generic/pgtable.h:391:2: note: in expansion of macro ‘BUILD_BUG’ BUILD_BUG(); ^~~~~~~~~ ... make[2]: *** [/home/dmjordan/src/linux/scripts/Makefile.build:316: mm/memory.o] Error 1 make[1]: *** [/home/dmjordan/src/linux/Makefile:1047: mm] Error 2