Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp522540lqp; Fri, 5 Apr 2024 00:13:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUgYguRMBcOpg2bq3W0T6rH1paazXuH6ISRH0GoFAEVxCSJjiTH4JdXiba3cCNQTZKzWyvLPsmL7mIs4tORnYUYmmGvft7yt3QzM5uMdQ== X-Google-Smtp-Source: AGHT+IFfFf79KLW+vDRtTuSL7DV172NAmcQS5Nzaf9ji7L3xdhXtE3WYZkPPUqGXSLONJj9Gy7bm X-Received: by 2002:a05:6358:7794:b0:17c:d10:722c with SMTP id p20-20020a056358779400b0017c0d10722cmr655129rwg.1.1712301237489; Fri, 05 Apr 2024 00:13:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712301237; cv=pass; d=google.com; s=arc-20160816; b=Cpt6hx4T7KzdxWgL7dWZu+R04vkA97EtSKtge1roCoRniE0Sgi4ePX1nhttO1p2N07 tMSdH5p/66+CGv/X0gywQsw+K2E4MxoF0YlpxMXiU5wK7VOAHtbV5Miscp0sbN2HBr+x VWU+yeOLXaWb2N371Qm/E6LziS44/nP4QA8RCupG+86QPSI3thPu0eJRSBs4oSVByJhf Ez85acsq5haeQpBo9XFv9uzJkZewf9rEL5oTG+CtlBSkkEn5oaLYeEQZvcdTtV/e+s0I g+yOT7ww0dcCLw1vJmiU0FW+Zpj3d7H7/oWgvKWUp3U1sr5k9P2fUbFI+NPNW4B2md1Z qRTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YgypSeYH3i2VABJBdQ8n7O1Ci6MVKApCIW3w9teQa8g=; fh=H9i9yI85j4lkHJI8l4JDpArAsAMHlsuzp+XuM2dIb18=; b=S/1tV0yrKcXbUTreyrYXYcgX8sZu2YxZzmHWA1ol3YLIGomyQz2gar5EqGPyJxeg0S BHeMcAnrGx6XCeMNQLODi1yIYGf1bLTThVAfblAeT1xozrQ9rwoWmZMEprRyeC2gWPwE vRZWcABNrZcX8rjsz1Da46r498p4Ag++/dLEJt97l4LVE6/1GH3TsJJ9oyekMG3iy4L7 S2zZSmpXwm9QbOyPQEUqxRIt7eZyvWEJvBkBsVRFql5kIGSP0VVdL9LZuvRT682eKDuo yOtMZNAUbWK0d+rbkG2zt5Fep3N1MGR55qDx8AcyllgoV2U3io78n8YRgjY7yrIikkc0 3FJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KnE1kdDH; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-132386-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132386-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r5-20020a63fc45000000b005e49f54a865si882937pgk.29.2024.04.05.00.13.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 00:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132386-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KnE1kdDH; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-132386-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132386-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5EEAB28B34D for ; Fri, 5 Apr 2024 03:36:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 731BC1C6A8; Fri, 5 Apr 2024 03:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KnE1kdDH" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 3BF4418E1D; Fri, 5 Apr 2024 03:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712288172; cv=none; b=T3aA17MKotJYEDJVnjf7ixv0kHUBi98/D+CqQtPGpfZNbVvMm14gE7/qIheu0PWfqAfGVIt133f2O1eC/51S28gRQBmniY7tZ5DREQR63oKlvTgjwrJ+SGf/yywDkAqf2PkRM5n5zkF15bqE3I2SaGSGYI2XsSxC30I8lmFE/Qg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712288172; c=relaxed/simple; bh=nX0IsLE4uVhgju3AbBgeFZE2Nzchyo4GvdtLkkz2gpw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rAd1oKhjNLdliqh/wSdHRt7G5CYSaGkE37kKFwigvzEMhOPsy1paETphB2TClXCDziYSnh/udzYxJW4ZG/1rrcFptP3dofDFnImzwFrg9ncz9cuznIdFHWpp1ltmZaKHtSoW4qud6egWmmRMRlnNQ4BU6uWQmmC0R050afSqz/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=KnE1kdDH; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YgypSeYH3i2VABJBdQ8n7O1Ci6MVKApCIW3w9teQa8g=; b=KnE1kdDHQ0+l2RtYnPW39XvQWB /ksbFn1pVcUQUu4ygucs3d4oLZHk5vz/36cnC8w++liHerMj4JvmmT+ibU/H2Ne7i+dONxaTiubEm N2U0ftWzAoCFMZNqG/3tYwYWWCBxYLYlINejPHjsmJcWFfxgInzDx0DB9c7wNajpNRqU/RFUAqWyp ySQs6mpkVjqbQbO6Or/dvuyk5c8In5hauv66Nu5dt/Bw/3lLkq9jfwLBuboMzS9KuMEz1+h8DgnN9 6GkXjRtNfImP2ol2DN86NzhhuAQhqwtry62chyZip0s0Z+CgH7SjYPQi8Vlq5J+eRs+Cfc1oJGF8g 3Mb5S23w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsaN1-00000009X85-3Ksj; Fri, 05 Apr 2024 03:36:04 +0000 Date: Fri, 5 Apr 2024 04:36:03 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , Gerald Schaefer , Thomas Huth Subject: Re: [PATCH v1 3/5] s390/uv: convert PG_arch_1 users to only work on small folios Message-ID: References: <20240404163642.1125529-1-david@redhat.com> <20240404163642.1125529-4-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240404163642.1125529-4-david@redhat.com> On Thu, Apr 04, 2024 at 06:36:40PM +0200, David Hildenbrand wrote: > Now that make_folio_secure() may only set PG_arch_1 for small folios, > let's convert relevant remaining UV code to only work on (small) folios > and simply reject large folios early. This way, we'll never end up > touching PG_arch_1 on tail pages of a large folio in UV code. > > The folio_get()/folio_put() for functions that are documented to already > hold a folio reference look weird and it should probably be removed. > Similarly, uv_destroy_owned_page() and uv_convert_owned_from_secure() > should really consume a folio reference instead. But these are cleanups for > another day. Yes, and we should convert arch_make_page_accessible() to arch_make_folio_accessible() ... one of the two callers already has the folio (and page-writeback already calls arch_make_folio_accessible()