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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 29924C43603 for ; Mon, 16 Dec 2019 13:54:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DBE8A20684 for ; Mon, 16 Dec 2019 13:54:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBE8A20684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6A4EC8E0006; Mon, 16 Dec 2019 08:54:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 656218E0003; Mon, 16 Dec 2019 08:54:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5444E8E0006; Mon, 16 Dec 2019 08:54:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 3FC978E0003 for ; Mon, 16 Dec 2019 08:54:51 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 0546E180AD802 for ; Mon, 16 Dec 2019 13:54:51 +0000 (UTC) X-FDA: 76271150382.10.nerve19_47605a8cbec2a X-HE-Tag: nerve19_47605a8cbec2a X-Filterd-Recvd-Size: 5964 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Dec 2019 13:54:50 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBGDcXix110269; Mon, 16 Dec 2019 08:54:33 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wwdt9c5aw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2019 08:54:33 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id xBGDch7m111283; Mon, 16 Dec 2019 08:54:32 -0500 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wwdt9c5ak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2019 08:54:32 -0500 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xBGDnjqe005801; Mon, 16 Dec 2019 13:54:31 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma02wdc.us.ibm.com with ESMTP id 2wvqc63gss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2019 13:54:31 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBGDsVbl28115330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Dec 2019 13:54:31 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 606F72805E; Mon, 16 Dec 2019 13:54:31 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5DAB28058; Mon, 16 Dec 2019 13:54:25 +0000 (GMT) Received: from [9.199.36.91] (unknown [9.199.36.91]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 16 Dec 2019 13:54:25 +0000 (GMT) Subject: Re: [PATCH 05/17] asm-generic/tlb: Rename HAVE_RCU_TABLE_NO_INVALIDATE From: "Aneesh Kumar K.V" To: Peter Zijlstra , Michael Ellerman 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> <20191211122955.940455408@infradead.org> <87woawzc1t.fsf@linux.ibm.com> <20191216123752.GM2844@hirez.programming.kicks-ass.net> <20191216132004.GO2844@hirez.programming.kicks-ass.net> Message-ID: <33ed03aa-a34c-3a81-0f83-20c3e8d4eff7@linux.ibm.com> Date: Mon, 16 Dec 2019 19:24:24 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-16_05:2019-12-16,2019-12-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=2 adultscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912160122 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/16/19 7:10 PM, Aneesh Kumar K.V wrote: > On 12/16/19 6:50 PM, Peter Zijlstra wrote: >> On Mon, Dec 16, 2019 at 06:43:53PM +0530, Aneesh Kumar K.V wrote: >>> On 12/16/19 6:07 PM, Peter Zijlstra wrote: >> >>>> I'm confused, are you saing you're happy to have PowerPC eat the ext= ra >>>> TLB invalidates? I thought you cared about PPC performance :-) >>>> >>>> >>> >>> Instead can we do >>> >>> static inline void tlb_table_invalidate(struct mmu_gather *tlb) >>> { >>> #ifndef CONFIG_MMU_GATHER_RCU_TABLE_FREE >>> =C2=A0=C2=A0=C2=A0=C2=A0 * Invalidate page-table caches used by hardw= are walkers. Then we=20 >>> still >>> =C2=A0=C2=A0=C2=A0=C2=A0 * need to RCU-sched wait while freeing the p= ages because software >>> =C2=A0=C2=A0=C2=A0=C2=A0 * walkers can still be in-flight. >>> =C2=A0=C2=A0=C2=A0=C2=A0 */ >>> =C2=A0=C2=A0=C2=A0=C2=A0tlb_flush_mmu_tlbonly(tlb); >>> #endif >>> } >> >> How does that not break ARM/ARM64/s390 and x86 ? >> >=20 > Hmm I missed that usage of RCU_TABLE_NO_INVALIDATE. >=20 > Ok I guess we need to revert this change that went upstream this merge=20 > window then >=20 > commit 52162ec784fa05f3a4b1d8e84421279998be3773 > Author: Aneesh Kumar K.V > Date:=C2=A0=C2=A0 Thu Oct 24 13:28:00 2019 +0530 >=20 > =C2=A0=C2=A0=C2=A0 powerpc/mm/book3s64/radix: Use freed_tables instead= of need_flush_all >=20 >=20 >=20 > I will review the change closely. So __p*_free_tlb() routines on ppc64 just mark that we need a page walk=20 cache flush and the actual flush in done in tlb_flush_mmu. As per d86564a2f085b79ec046a5cba90188e61235280 (mm/tlb, x86/mm: Support=20 invalidating TLB caches for RCU_TABLE_FREE ) that is not sufficient? -aneesh