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 AE057EB64DD for ; Thu, 13 Jul 2023 10:43:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 144588D0003; Thu, 13 Jul 2023 06:43:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CD758D0001; Thu, 13 Jul 2023 06:43:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E89338D0003; Thu, 13 Jul 2023 06:43:00 -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 D4F648D0001 for ; Thu, 13 Jul 2023 06:43:00 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 98861C01ED for ; Thu, 13 Jul 2023 10:43:00 +0000 (UTC) X-FDA: 81006250920.28.A8B6A53 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf16.hostedemail.com (Postfix) with ESMTP id 1E181180015 for ; Thu, 13 Jul 2023 10:42:57 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=UWoYASnD; spf=pass (imf16.hostedemail.com: domain of borntraeger@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=borntraeger@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689244978; 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=8BufaUFC4lq+i0mb7tum+tW3iSrvIdyYFfiCKGJV2Qk=; b=JGCYyRq54YyfOgthJAEphm7Hlokx7sDjPBQZlTfSetSWkVnj1wAorP4PiatxpbtvZhTT8C eSyBtSGgZf1qD8SesC7OHx/jWh1gxVDoYJrQlXJ9zHks8dLtC0t4bG+21qZ8H9TqICn6uK iKqq/inUOu44O9vQFmoR4Hf+kkv0nDU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689244978; a=rsa-sha256; cv=none; b=LxGIjZGLcrYJtUK0ntM3lAnNAZb0K2Pt+dHzwq6v+xFejKmTqFSCYZUnYc/nDbsdqpg/yJ l76RaKA8oefRnKqlQDT2KWGxGRFVE/J8dWkhna6k3bkQPNsczV5ALrck6bfqIUGLZW3uk3 e3GBjZ1W2Y7rrGkEEgCyK0waJJujIUw= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=UWoYASnD; spf=pass (imf16.hostedemail.com: domain of borntraeger@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=borntraeger@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36DALboQ023181; Thu, 13 Jul 2023 10:42:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=8BufaUFC4lq+i0mb7tum+tW3iSrvIdyYFfiCKGJV2Qk=; b=UWoYASnDlKVaItp/McDdVJ7xToFqq7bV2TMwidsakp9z61MBv99gGJNVx52W/4MRHqkj DbOGTFGGOve11J04Ncw6vAzYmJQnuBgQ4C05isIoQFvnqD0bJvSpmZvXIssFAakdiN51 T/1qH7T7MwuIZWhXh/RdRUA7lEAoCJyQXVw34FY9kqbeMrFv4PvRajPk071PadjA1NDW nc7KCFIiMOrpOnYvu0g0bAmDvTOnl0xVnjsdTjiI8bSi7mRfiHcXNiRnVAJd8Dj8IFnx VbX2wlkBCUdOMKZOgquzh1xWJ5GO8o701DeAkU5+yR3t66R4feT8p3uhAzcW+fmT2HK9 FQ== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rtfeugh64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 10:42:51 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36D1vZKw012770; Thu, 13 Jul 2023 10:42:49 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3rpye5aauq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 10:42:49 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36DAgjN027263496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jul 2023 10:42:45 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 631402004B; Thu, 13 Jul 2023 10:42:45 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEB552004F; Thu, 13 Jul 2023 10:42:44 +0000 (GMT) Received: from [9.171.85.252] (unknown [9.171.85.252]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 13 Jul 2023 10:42:44 +0000 (GMT) Message-ID: <56ca93af-67dc-9d10-d27e-00c8d7c20f1b@linux.ibm.com> Date: Thu, 13 Jul 2023 12:42:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v5 00/38] New page table range API To: Matthew Wilcox Cc: Andrew Morton , Claudio Imbrenda , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gerald Schaefer , linux-s390 References: <20230710204339.3554919-1-willy@infradead.org> <8cfc3eef-e387-88e1-1006-2d7d97a09213@linux.ibm.com> Content-Language: en-US From: Christian Borntraeger In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: iA3442D4Wv-j8LnOlc5uYmBlAGOt8UUj X-Proofpoint-ORIG-GUID: iA3442D4Wv-j8LnOlc5uYmBlAGOt8UUj 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-13_04,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=425 impostorscore=0 suspectscore=0 adultscore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307130092 X-Rspamd-Queue-Id: 1E181180015 X-Rspam-User: X-Stat-Signature: 9kn7o8q94n98j3dghp4gta6fcrcmqij5 X-Rspamd-Server: rspam03 X-HE-Tag: 1689244977-619624 X-HE-Meta: U2FsdGVkX1/KTECPrtmrvXTXqQWlQiLO9z/l1tN9iFsrVx6qbzvyk9D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000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Am 11.07.23 um 14:36 schrieb Matthew Wilcox: > 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 > need a new design. s390 seems to do a lot of unusual things. I wish > you'd talk to the rest of us more. I understand you point from a logical point of view, but a 4k page frame is also a hardware defined memory region. And I think not only for us. How do you want to implement hardware poisoning for example? Marking the whole folio with PG_hwpoison seems wrong.