Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp686267lqo; Wed, 8 May 2024 11:30:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSsVXTmew+8n0nRhqkiRhT1a/VwdfwIhgIDqAckXB3+0gVfQR0if4mOn/zxZL5vL6sDBZ3bYKH7qscwLVtC1ZHRovcyIus40vaYGoRrQ== X-Google-Smtp-Source: AGHT+IE70nUIMS1A4uv+yP+c/Hi+5fXqi/7pf55cRR83TxemtshV8jDozIpOllFhIZ2NFU/O+XSU X-Received: by 2002:a05:6512:6c:b0:521:cee5:db3d with SMTP id 2adb3069b0e04-521cee5dcfbmr792994e87.50.1715193014273; Wed, 08 May 2024 11:30:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715193014; cv=pass; d=google.com; s=arc-20160816; b=kUVxJm9RB23DcqOS7/iKr+nevlfDvuWizJVzxTmoFsEXIdVLlNaKZjmzp+/zODpUU7 4z+p45YtEj5XHw9xKzsJeFpTs6aHvX8dI2tY87nVSATxIDLbsEt7mxa6u2BQD+tOD8Xh ice+D+FMKtmQwaO3m6WgkbeJEGjINxCQaPjfiqPT7cgb2ah8iokShw2zHiTZtRcqEQJ+ Yko+BaBO9cKwpiSxpvVubAD/DkuSXgcbnqyfV/QNaDhMWZMnThR9ZeBrpS01brOz9BYX WquAGEWkVOZf5pF0hMAh9j590Ub7Qsyq8mWi2BkHWMqjtWPxXbMwYoQmw6oDUs+xCZPz nRug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ZRQClyq6NCq+r6tZYqc96Ix/EYxfWTPYPd8njOlX/60=; fh=A+QcyawwK6Yq8daxuWFm+g/417ivXyGCFoP00qnMPro=; b=bwqaL/FjvxP5FTp/VrK1/cEkhDGZa1UUlh6Qay6zsRHI133sJxqrNt8Mas8j0YYKEc wuGJRUTrGqN5RBapsLIikkNw6JpoAWee1vn+sLA51e8fQXc7aBSJab+c4c8YJ1WtIvHI sOaWU9iD3+uhRK82RydQ0uHLc68gnzVVK8RRRpD1flMy5w2/5JZIzEcLUtjRGzPNJEA2 e0ISLy9k0u1RGKhKqzCsd0Esnzov6gwub567DjcdWx6tnJvsLX0utZY8aYKbuPxk8267 NDOV/yoVbXtW4LvrVEgwkkWObFm8m2o+T24TcZ5LQbOaARywjTJiMcdfTQUP2tTRYLZ9 mWQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g1qgpnqR; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jz20-20020a170906bb1400b00a59c987bb70si3774215ejb.1055.2024.05.08.11.30.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 11:30:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g1qgpnqR; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F3FB51F24FC1 for ; Wed, 8 May 2024 18:30:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 615F912DD9A; Wed, 8 May 2024 18:30:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g1qgpnqR" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D485812D76E for ; Wed, 8 May 2024 18:30:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715193005; cv=none; b=nAao54gJNCBA+bJOyH24Yf9YuPHa8z4WaDY9OQKXtQ4TuPzWAuKfb9q2PsUR/DuB5GdY0BjlIMlDFXComJSVP6xfR1Uc7z8wKoig958PBHKRqFX6FeBFphqJ9bQcOZwLTS5PtqDxBB9hX9A258+pgJwOFlThR0lFbG2+H4Dm0SE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715193005; c=relaxed/simple; bh=Af8N4wZvAUQNJQSK6fWTOSDCmGwfI/n8jS+x3krwiAw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OdN7DjNp/BLTImlr5eCGfpHBWeSBD/GZ/udyX8qDkloIRWC9yMvBc4nGa0g2P7K1j70tFc6zm5FQkieqDjB66k6lmWe/ie7Fi0imn3ZeGrIlDEa4mV7QCKV2oxx9oSQ22KskTSg5O8YWUMq/bgJh39UUtBs7IRYNsAG4/54AHKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=g1qgpnqR; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715193002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZRQClyq6NCq+r6tZYqc96Ix/EYxfWTPYPd8njOlX/60=; b=g1qgpnqRqg1FEXop8OmnzKciXLR1HJYn6jqih4Arge+pa0+H44eUFYy6HkhVO0bT0DA9cw 1PcAY3uXem4rJjw+VVRMwuUIG/DHaJE7OTi2lCEY1xeDGHb+CzCeJaJJLiBQvd26NuNLTJ CJmQan3oHG3Pwc5PqvIqMbIKzmKOPg0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-249-m407-a4UOv6tTjIN-Jxvqw-1; Wed, 08 May 2024 14:29:59 -0400 X-MC-Unique: m407-a4UOv6tTjIN-Jxvqw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1198C8007BC; Wed, 8 May 2024 18:29:59 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D36510000AD; Wed, 8 May 2024 18:29:56 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , Gerald Schaefer , Matthew Wilcox , Thomas Huth Subject: [PATCH v3 00/10] s390: PG_arch_1+folio cleanups for uv+hugetlb Date: Wed, 8 May 2024 20:29:45 +0200 Message-ID: <20240508182955.358628-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Rebased on 390x/features. Cleanups around PG_arch_1 and folio handling in UV and hugetlb code. One "easy" fix upfront. Another issue I spotted is documented in [1]. Once this hits upstream, we can remove HAVE_ARCH_MAKE_PAGE_ACCESSIBLE from core-mm and s390x, so only the folio variant will remain. Compile tested, but not runtime tested with UV, I'll appreciate some testing help from people with UV access and experience. [1] https://lkml.kernel.org/r/20240404163642.1125529-1-david@redhat.com v2 -> v3: * "s390/uv: split large folios in gmap_make_secure()" -> Spelling fix * "s390/hugetlb: convert PG_arch_1 code to work on folio->flags" -> Extended patch description v1 -> v2: * Rebased on s390x/features: * "s390/hugetlb: convert PG_arch_1 code to work on folio->flags" -> pmd_folio() not available on s390x/features * "s390/uv: don't call folio_wait_writeback() without a folio reference" -> Willy's folio conversion is in s390x/features * "s390/uv: convert PG_arch_1 users to only work on small folios" -> Add comments * Rearrange code and handle split_folio() return values properly. New patches to handle splitting: -> "s390/uv: gmap_make_secure() cleanups for further changes" -> "s390/uv: split large folios in gmap_make_secure()" * Added more cleanups: -> "s390/uv: make uv_convert_from_secure() a static function" -> "s390/uv: convert uv_destroy_owned_page() to uv_destroy_(folio|pte)()" -> "s390/uv: convert uv_convert_owned_from_secure() to uv_convert_from_secure_(folio|pte)()" -> "s390/mm: implement HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE" Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Janosch Frank Cc: Claudio Imbrenda Cc: Gerald Schaefer Cc: Matthew Wilcox (Oracle) Cc: Thomas Huth David Hildenbrand (10): s390/uv: don't call folio_wait_writeback() without a folio reference s390/uv: gmap_make_secure() cleanups for further changes s390/uv: split large folios in gmap_make_secure() s390/uv: convert PG_arch_1 users to only work on small folios s390/uv: update PG_arch_1 comment s390/uv: make uv_convert_from_secure() a static function s390/uv: convert uv_destroy_owned_page() to uv_destroy_(folio|pte)() s390/uv: convert uv_convert_owned_from_secure() to uv_convert_from_secure_(folio|pte)() s390/uv: implement HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE s390/hugetlb: convert PG_arch_1 code to work on folio->flags arch/s390/include/asm/page.h | 5 + arch/s390/include/asm/pgtable.h | 8 +- arch/s390/include/asm/uv.h | 12 +- arch/s390/kernel/uv.c | 207 +++++++++++++++++++++----------- arch/s390/mm/fault.c | 14 ++- arch/s390/mm/gmap.c | 10 +- arch/s390/mm/hugetlbpage.c | 8 +- 7 files changed, 172 insertions(+), 92 deletions(-) -- 2.45.0