From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, URIBL_DBL_ABUSE_MALW,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11856C35242 for ; Mon, 27 Jan 2020 08:13:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E583121569 for ; Mon, 27 Jan 2020 08:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728709AbgA0INt (ORCPT ); Mon, 27 Jan 2020 03:13:49 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42018 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728241AbgA0INs (ORCPT ); Mon, 27 Jan 2020 03:13:48 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00R8AUXf090980 for ; Mon, 27 Jan 2020 03:13:47 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xrhv01ese-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Jan 2020 03:13:47 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Jan 2020 08:13:44 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 27 Jan 2020 08:13:39 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00R8CkLr25690530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jan 2020 08:12:47 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16B1511C05C; Mon, 27 Jan 2020 08:13:38 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B31411C070; Mon, 27 Jan 2020 08:13:35 +0000 (GMT) Received: from [9.124.35.62] (unknown [9.124.35.62]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 27 Jan 2020 08:13:35 +0000 (GMT) Subject: Re: [PATCH mk-II 08/17] asm-generic/tlb: Provide MMU_GATHER_TABLE_FREE To: Peter Zijlstra , Guenter Roeck Cc: Will Deacon , Andrew Morton , Nick Piggin , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yoshinori Sato , Rich Felker , "David S. Miller" , Helge Deller , Geert Uytterhoeven , Paul Burton , Tony Luck , Richard Henderson , Nick Hu , Paul Walmsley References: <20191211120713.360281197@infradead.org> <20191211122956.112607298@infradead.org> <20191212093205.GU2827@hirez.programming.kicks-ass.net> <20200126155205.GA19169@roeck-us.net> <20200127081134.GI14914@hirez.programming.kicks-ass.net> From: "Aneesh Kumar K.V" Date: Mon, 27 Jan 2020 13:43:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200127081134.GI14914@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 20012708-0028-0000-0000-000003D4B1D3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20012708-0029-0000-0000-00002498F4BC Message-Id: <33932bc9-1fca-66ae-8f55-6da2f131c5be@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-27_02:2020-01-24,2020-01-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxlogscore=599 clxscore=1015 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 mlxscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2001270070 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/20 1:41 PM, Peter Zijlstra wrote: > On Sun, Jan 26, 2020 at 07:52:05AM -0800, Guenter Roeck wrote: >> On Thu, Dec 12, 2019 at 10:32:05AM +0100, Peter Zijlstra wrote: >>> As described in the comment, the correct order for freeing pages is: >>> >>> 1) unhook page >>> 2) TLB invalidate page >>> 3) free page >>> >>> This order equally applies to page directories. >>> >>> Currently there are two correct options: >>> >>> - use tlb_remove_page(), when all page directores are full pages and >>> there are no futher contraints placed by things like software >>> walkers (HAVE_FAST_GUP). >>> >>> - use MMU_GATHER_RCU_TABLE_FREE and tlb_remove_table() when the >>> architecture does not do IPI based TLB invalidate and has >>> HAVE_FAST_GUP (or software TLB fill). >>> >>> This however leaves architectures that don't have page based >>> directories but don't need RCU in a bind. For those, provide >>> MMU_GATHER_TABLE_FREE, which provides the independent batching for >>> directories without the additional RCU freeing. >>> >>> Signed-off-by: Peter Zijlstra (Intel) >>> --- >> >> Various sparc64 builds (allnoconfig, tinyconfig, as well as builds >> with SMP disabled): >> >> mm/mmu_gather.c: In function '__tlb_remove_table_free': >> mm/mmu_gather.c:101:3: error: implicit declaration of function '__tlb_remove_table'; did you mean 'tlb_remove_table'? > > Thanks; I'll respin these patches against Aneesh' pile and make sure to > look into this when I do so. > > I did send a change to fix that. it is to drop !SMP change in the patch https://lore.kernel.org/linux-mm/87v9p9mhnr.fsf@linux.ibm.com -aneesh