From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 F2FDE3C0611 for ; Wed, 20 May 2026 22:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779315704; cv=none; b=G0Onwb7krH8qJud3/PodDA2+wQTKNlFU2loh29FRuuneybk8ZP0GkSastgN5+MtpTTdwHbspA/jQQ+ekjrISP+snyM4R7wpnERWg8LR3CQ9UotmELwS7MQR3P2z4kqPBi63y1BH8OXSlPKZgoWzkmIBxTx6SeN/2IXiCHyO1XEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779315704; c=relaxed/simple; bh=B4v7SD6SJ84KapLgBy+iXreANiiaF75HE81bu1RBt3E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dw6rG5I+sxcCIDnolKLbgh1pXZ4ZHNTipLv2RFcsj4Hwgrx75CfH7FtK966azrgB7PoBFR7lt50s/ND7qRQaO0w0HAeY0tX6Xh/RbC+WWX3dGBGqxRyvyvbIGDKW5lCm+/xv+OSDTCgvAMvKf6ku5KymW1fo2afDzAeZkEE3UbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=ay/iaZkH; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=hGNcq9N7; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ay/iaZkH"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="hGNcq9N7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779315702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jpAQ9O1oMgUNlo5ukg9OEno1SM1k+70VK2/jH7/8vVM=; b=ay/iaZkHfOAYwlSlXLbBF4/axJd0NLUBQSbgNENDC0yVyMG2BGWWukB95/c0EP9diLCv9E 6RROMokQvP+Hplo/JqtAWqP824KLI892JU50kj6VI1BUzAxni+DVAhKoiTaSsGVZawbe3w wEIMwPF6caiGaatSRqhXILZ3LskVcVU= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-194-UbrhV5qJNam-Zl_inIlaLQ-1; Wed, 20 May 2026 18:21:40 -0400 X-MC-Unique: UbrhV5qJNam-Zl_inIlaLQ-1 X-Mimecast-MFC-AGG-ID: UbrhV5qJNam-Zl_inIlaLQ_1779315699 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-44d79da8cf7so4412927f8f.2 for ; Wed, 20 May 2026 15:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779315699; x=1779920499; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jpAQ9O1oMgUNlo5ukg9OEno1SM1k+70VK2/jH7/8vVM=; b=hGNcq9N7pUarL6XtaFvxL+cInCOU6M3RV5ST/YgjIi1NWLSQUIzk69wt++ygqUSnTr EKPyOFxSGKSZ/fBZ7J3kqX7oad7mocwcEppRWmms5J/EYWeQA1FRxMiu58WO97nuFyoC d+frtIuHngMbaC5d0Zo0IeCf75gwQCDuxUIN+SIRw6Nzjo45zZnjL2T0GbCmNFU5U6F9 N8hXOc9c8gEdyZqg6urSWGC0FiGm0hCPNypyU4Ebn8g0U4DvSW9dJYcJJpvhrTbjMk23 nPwAaco8SCYQIP7UTC5WvomvL3MpQPvA9QRmtbIu8gHELxxjdfLOwhaswhf9VcxHN8Fq k6Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779315699; x=1779920499; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jpAQ9O1oMgUNlo5ukg9OEno1SM1k+70VK2/jH7/8vVM=; b=dSrPQO9vqSRYlMDY0Wa91Y8C+LCNaQKePkF2ePhHEEKiu6d5p14nQG5NMPxc1ivoh4 Bz90zqij3HmkXf8oXqy6VdSlA7Rv8JMSFMhPOi5j1gwJaY3jShhjfzS9bpINzWRivybE vfmFqJW7De0o8lLcqdNJIItqO/jj3igT+QkttUaZUjrQH5VEouVgcpeZXYcneIXcpb/9 it26JdzbDnT60TwLnKsuJUse1C9pc5JOemv54HQc2tOgp0jo8nbA2bJJYsznbhby38IM CsChGHXFezwyT1YcLzSQtNSrGth3lkUsi0rCD2Wd3IHhKwpfm6GzUGvwszSfA1xeI0hu mU5Q== X-Gm-Message-State: AOJu0YwC2zXkwsRwYszZyNEsJvoB8J8kBFKLdDgiab+s7mNb0kwsUeDZ 38ea9EFRN1L1K1RoLBF04ViW/L/n8rosaxtKEqsPT+s3zSk1azFvcmzIY4voL+S6HdRTrefZ0Bi M/LlC5hXpHrXR57ZhEkw6ufaoFFY7QC8OnkBlliNEqybEvlwNCy5WigBPULRUH1B9cQ9BTb+dS9 OXXOSHtSSDK54k9UudymjMfnME7rN7gONVvJr67LUZwoU= X-Gm-Gg: Acq92OGwgxkM7pH+Ns6rwLwyKQGdmddCsP8usHahmM1BRPoRgRrjo2a1FOG+uSNVhGk ffi8mWjawj4a/dw35HVfdrAvf3gLPPsfHTFjN6uEjsP440MyHAB65lUICzmGNWN3x6JbgxJQOIw Hpg/WZeHXrTZhqQYiYlSN5j1X2pMkUBMpCcG+C0l0gFK3wsmHT+yMEu3neBiexRxN5TPrtYwYw0 RGCKdWVwFdNdF/p+CiccE+XBvmxGok1AN9nkpU+rg37O5W4VwAKGYIdSNgPIcCk7wFX9GMcdx68 Bgz38a3G8STUV3RKvgQWARwXbSfVi44ziboPgGodnB4+rsZ7/71Juskp9BuctP546xV/v537fQ+ rRpNgC3UIB23i0suwphgsdORI5j1iONCzOs+lE6yKOWk= X-Received: by 2002:a05:6000:186f:b0:45d:b14b:23fb with SMTP id ffacd0b85a97d-45ea38bae4dmr340610f8f.11.1779315699283; Wed, 20 May 2026 15:21:39 -0700 (PDT) X-Received: by 2002:a05:6000:186f:b0:45d:b14b:23fb with SMTP id ffacd0b85a97d-45ea38bae4dmr340516f8f.11.1779315698648; Wed, 20 May 2026 15:21:38 -0700 (PDT) Received: from redhat.com (IGLD-80-230-25-45.inter.net.il. [80.230.25.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e767d0bsm55493374f8f.3.2026.05.20.15.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 15:21:38 -0700 (PDT) Date: Wed, 20 May 2026 18:21:33 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: "David Hildenbrand (Arm)" , Jason Wang , Xuan Zhuo , Eugenio =?utf-8?B?UMOpcmV6?= , Muchun Song , Oscar Salvador , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Hugh Dickins , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Axel Rasmussen , Yuanchu Xie , Wei Xu , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , virtualization@lists.linux.dev, linux-mm@kvack.org, Andrea Arcangeli Subject: [PATCH v8 13/37] mm: use __GFP_ZERO in vma_alloc_zeroed_movable_folio Message-ID: References: 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: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Now that post_alloc_hook() handles cache-friendly user page zeroing via folio_zero_user(), convert vma_alloc_zeroed_movable_folio() to pass __GFP_ZERO instead of zeroing at the callsite. Signed-off-by: Michael S. Tsirkin Assisted-by: Claude:claude-opus-4-6 --- include/linux/highmem.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index af03db851a1d..ffa683f64f1d 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -320,13 +320,8 @@ static inline struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma, unsigned long vaddr) { - struct folio *folio; - - folio = vma_alloc_folio(GFP_HIGHUSER_MOVABLE, 0, vma, vaddr); - if (folio && user_alloc_needs_zeroing()) - clear_user_highpage(&folio->page, vaddr); - - return folio; + return vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, + 0, vma, vaddr); } #endif -- MST