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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B1AAC001DC for ; Tue, 11 Jul 2023 15:25:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5158D6B0072; Tue, 11 Jul 2023 11:25:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C5956B0074; Tue, 11 Jul 2023 11:25:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 366706B0075; Tue, 11 Jul 2023 11:25:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 24F8A6B0072 for ; Tue, 11 Jul 2023 11:25:01 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 840EB160312 for ; Tue, 11 Jul 2023 15:25:00 +0000 (UTC) X-FDA: 80999703960.24.CED614D Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf14.hostedemail.com (Postfix) with ESMTP id 1973B10000F for ; Tue, 11 Jul 2023 15:24:56 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=H417dPSM; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf14.hostedemail.com: domain of imbrenda@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=imbrenda@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689089097; a=rsa-sha256; cv=none; b=mEBGCdvUK3/mnI9IpyaW70nJd69YOZoKSsDcZOIKyaz2ORzFEgX6gg5gpyHOgkVUjorMRI EAUpgycZWRXTy2D/gzuLMGV2gM2eFsEC+Ht6vgVLWZD+PjJ3/A+fXlhbhH1hQ4kUrQRZVm Bjd3naE1j+c5A1j9+BMCaLfPowGn55c= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=H417dPSM; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf14.hostedemail.com: domain of imbrenda@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=imbrenda@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689089097; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8vRKIB/oQSe4Fw8xR2W+LRHW6mvyUpJiz4TUanc6P/U=; b=2MZzW0QVYJXsEnpZxSjiUk18OEUb+5eBwbnxFi7jFg5jE4kZfdWXqJxWNYfSaNsoUz3kLF KudElzW7UKTy3Ayh0h9SxEsJC3nFFytc0ecwlzh7P2GmDvPyCxXUpb4Dt2W7rDjJZKj98h LzK84sl4FNyKTZnmQF43PaG9yueSpaQ= Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36BFElpw015862; Tue, 11 Jul 2023 15:24:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=8vRKIB/oQSe4Fw8xR2W+LRHW6mvyUpJiz4TUanc6P/U=; b=H417dPSMKp6L5jR6Xh6YEFUIDTLT7ar5WfwgdzN00bnd7a95kJVeRgk1K2eWeDyiK1sm WtNaeTrrnGHcw7ZdEjX4h9ZUMXD+SNjOUDlYnT8oJfj6S0LUeIz27PgXPKJXdDHdCyNq FLAkiSzM2lGIFd9Xir08B66tkl4MgigU35goPOepOTdYK9Xk9mOhI37g77N53nLKeHbj dv1ZzVjuY3f/uj3q9v0xCB8/5VKN4+UtJnIWt32oal0wzFuAkJDqFYgrQCY01WKU1glu hTPWxDb/h8I8bwoGhzQD6fuJjiWoxXMAdNjHdfc9aBY8ZLabEbXyKIG+upDPKjlK+1iP FA== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rs9j80ah4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 15:24:48 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36B9vbmo015539; Tue, 11 Jul 2023 15:24:46 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3rpy2e1v28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 15:24:45 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36BFOgV550201022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Jul 2023 15:24:42 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 691A020040; Tue, 11 Jul 2023 15:24:42 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E1BC20043; Tue, 11 Jul 2023 15:24:42 +0000 (GMT) Received: from p-imbrenda (unknown [9.152.224.66]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 11 Jul 2023 15:24:42 +0000 (GMT) Date: Tue, 11 Jul 2023 17:24:40 +0200 From: Claudio Imbrenda To: Matthew Wilcox Cc: Christian Borntraeger , Andrew Morton , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gerald Schaefer , linux-s390 Subject: Re: [PATCH v5 00/38] New page table range API Message-ID: <20230711172440.77504856@p-imbrenda> In-Reply-To: References: <20230710204339.3554919-1-willy@infradead.org> <8cfc3eef-e387-88e1-1006-2d7d97a09213@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: HXlugPUk1Rr1lSlFvJf0rDVCUbZBdS0K X-Proofpoint-GUID: HXlugPUk1Rr1lSlFvJf0rDVCUbZBdS0K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-11_08,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=1 phishscore=0 spamscore=1 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1011 adultscore=0 mlxscore=1 mlxlogscore=224 suspectscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307110135 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1973B10000F X-Stat-Signature: u4rd1wojpxxbzuec9nhpyew58j7d4pem X-HE-Tag: 1689089096-807963 X-HE-Meta: U2FsdGVkX19Wpznylh/QPJN4hsECThEq6Dp1oYv8+cEtNVg4HMqMyDwFHqobYxwy9GNmDTud/mnnyVJ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Brk0gtdMS3UQ+DH2hu8Vkrz060OeAXH1SnbhNsDTSqD5kah2Dmc75NWVPAZ 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 Tue, 11 Jul 2023 13:36:27 +0100 Matthew Wilcox wrote: > On Tue, Jul 11, 2023 at 11:07:06AM +0200, Christian Borntraeger wrote: > > Am 10.07.23 um 22:43 schrieb Matthew Wilcox (Oracle): > > > This patchset changes the API used by the MM to set up page table entries. > > > The four APIs are: > > > set_ptes(mm, addr, ptep, pte, nr) > > > update_mmu_cache_range(vma, addr, ptep, nr) > > > flush_dcache_folio(folio) > > > flush_icache_pages(vma, page, nr) > > > > > > flush_dcache_folio() isn't technically new, but no architecture > > > implemented it, so I've done that for them. The old APIs remain around > > > but are mostly implemented by calling the new interfaces. > > > > > > The new APIs are based around setting up N page table entries at once. > > > The N entries belong to the same PMD, the same folio and the same VMA, > > > so ptep++ is a legitimate operation, and locking is taken care of for > > > you. Some architectures can do a better job of it than just a loop, > > > but I have hesitated to make too deep a change to architectures I don't > > > understand well. > > > > > > One thing I have changed in every architecture is that PG_arch_1 is now a > > > per-folio bit instead of a per-page bit. This was something that would > > > have to happen eventually, and it makes sense to do it now rather than > > > iterate over every page involved in a cache flush and figure out if it > > > needs to happen. > > > > I think we do use PG_arch_1 on s390 for our secure page handling and > > making this perf folio instead of physical page really seems wrong > > and it probably breaks this code. > > Per-page flags are going away in the next few years, so you're going to For each 4k physical page frame, we need to keep track whether it is secure or not. A bit in struct page seems the most logical choice. If that's not possible anymore, how would you propose we should do? > need a new design. s390 seems to do a lot of unusual things. I wish s390 is an unusual architecture. we are working on un-weirding our code, but it takes time > you'd talk to the rest of us more.