Message ID | 20241108162040.159038-6-tabba@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 9C619D64064 for <linux-mm@archiver.kernel.org>; Fri, 8 Nov 2024 16:21:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34FA46B009D; Fri, 8 Nov 2024 11:20:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D4566B009E; Fri, 8 Nov 2024 11:20:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FF826B009F; Fri, 8 Nov 2024 11:20:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E48FF6B009D for <linux-mm@kvack.org>; Fri, 8 Nov 2024 11:20:57 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 66BC2160E40 for <linux-mm@kvack.org>; Fri, 8 Nov 2024 16:20:57 +0000 (UTC) X-FDA: 82763441334.02.11CAA97 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf17.hostedemail.com (Postfix) with ESMTP id 2604240027 for <linux-mm@kvack.org>; Fri, 8 Nov 2024 16:20:26 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=gFAtlHw+; spf=pass (imf17.hostedemail.com: domain of 3ZjouZwUKCNMIz00z5DD5A3.1DBA7CJM-BB9Kz19.DG5@flex--tabba.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3ZjouZwUKCNMIz00z5DD5A3.1DBA7CJM-BB9Kz19.DG5@flex--tabba.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731082686; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=EuhnD2p0KG553uFJn8sTE5BvDRtJggITHppkxTMLSiU=; b=ue6vBA2Mom03H8qumjYZCpz7KqdkY1vBXkcYNQQcr/bg4Kk/nIY/mnBSwdw9UJz6fZ+N4G eDWOKYKtxUlSuq6hHpLSfgLbStuOZU+NSf7cZi1YPbiE4r8/fRzJxS7q9+7DR9xWIRDhTC KoSvX7Dv6JhZDgcnNTbM2rgyPrsAy34= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=gFAtlHw+; spf=pass (imf17.hostedemail.com: domain of 3ZjouZwUKCNMIz00z5DD5A3.1DBA7CJM-BB9Kz19.DG5@flex--tabba.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3ZjouZwUKCNMIz00z5DD5A3.1DBA7CJM-BB9Kz19.DG5@flex--tabba.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731082686; a=rsa-sha256; cv=none; b=p0mEuZ7R2qIQRGYWRUgS1hy57bA1ZM2xAQXxSQUBAy7FZQ9d5v/OKx+CkU6bPEp4CVRh1X RE5xGAowfDHOe3sDgeLeK9DKN5j9XNNr2W+SOPJ9rpoZ9h173zvqTsTxF33XUy11PNLacM xh/T66SPCDmSkYgl9UiB6YxDjMv2XNs= Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e293150c2c6so4623141276.1 for <linux-mm@kvack.org>; Fri, 08 Nov 2024 08:20:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731082854; x=1731687654; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=EuhnD2p0KG553uFJn8sTE5BvDRtJggITHppkxTMLSiU=; b=gFAtlHw+bXtEJ7lYjMYWi6xe9iRm0vFaLVneIOxZf8+KOzwCn1LEa3LegGTqTcgLm/ +m7oc+aIlgZwjcy90pl8GtnZ4wi/sHDPBpo1XMXz8e3aECAlFJ7HM+tBPT+xM+PoRdEI Djl2MDxSgiZ3FHi5Tduw57BYhAtgkHOfyr5TqttmKyE5KWaxxKq8qtGdNca46ZLHkpk+ aRGvMNcMnrkpAgjanKg7IQZGfC8HiFbpRIP4B5w3VN2xPVo0gIRoXzGRM/oXSOEEWQi8 LpxzT4cLs8RznsxvEUc93Fg+Y/UZhoyvKBi89FH/XRX6go3oG1R284Ppm0VRVArJUEny YQdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731082854; x=1731687654; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EuhnD2p0KG553uFJn8sTE5BvDRtJggITHppkxTMLSiU=; b=N5ZmJwgY8AUeZ75rzpBWsnTtaA8xDl6sQICGQf4onZkp/vIS8N+6pURdMjzF79vNdz F09IjZ1sjXK74Bj80AkgwQ6Fjdrs74uDOaAuFU+9iwr2l8aN8vv1kS7cMo8kjzxu9Fdi L26Ci/6d6/NSgebdtxAROykeiGyes3WTkKBxWSPKb6bWQBdGRl2RFEwAL5xCs1zuW+Ij Rx0YPu3ARm2qDSGBUrj1duZOWRgqsUWJy/bNMHGz0+0pVB3bH0a+IUU7ruA/BsodkCdL 4HPT0U7Le+S2bbL139XSCta7JYcv5Uufu8mI3XRBE1sG3c7y2v/CH/h14hMqwjTz8YhA g9tA== X-Gm-Message-State: AOJu0Yy/MhZm49WvixnITN0LjgrV7mHXDVSmZiLBRbXorKGKkWKbKBoY tHJ/831IZJGM5Ddd2oZeT7ppcZ3vMWWigXN2JnX+k4SHFqQ8fxs1WSWhKm3Sl6oaS+OQHCtGo3A J7ZUsr3ENK/dCc7PzwE70S2eOvFb8GPOAJNSBW7sFD1UWJYqcfooYwzrfUgaRtywSkpSxUxXlW9 4riKyTzPOeVOsW9AhQe9FOfg== X-Google-Smtp-Source: AGHT+IESFJvscd0BPH0GhrFsgF5ykZdsLy8VBXsCYVPr2h3JOn3SzzNujpcRbxNhrkNgQoNrxNGAtYBroQ== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a25:d001:0:b0:e30:d518:30f2 with SMTP id 3f1490d57ef6-e337f8417b3mr2585276.1.1731082854058; Fri, 08 Nov 2024 08:20:54 -0800 (PST) Date: Fri, 8 Nov 2024 16:20:35 +0000 In-Reply-To: <20241108162040.159038-1-tabba@google.com> Mime-Version: 1.0 References: <20241108162040.159038-1-tabba@google.com> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog Message-ID: <20241108162040.159038-6-tabba@google.com> Subject: [RFC PATCH v1 05/10] mm/hugetlb: use folio->lru int demote_free_hugetlb_folios() From: Fuad Tabba <tabba@google.com> To: linux-mm@kvack.org Cc: kvm@vger.kernel.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, david@redhat.com, rppt@kernel.org, jglisse@redhat.com, akpm@linux-foundation.org, muchun.song@linux.dev, simona@ffwll.ch, airlied@gmail.com, pbonzini@redhat.com, seanjc@google.com, willy@infradead.org, jgg@nvidia.com, jhubbard@nvidia.com, ackerleytng@google.com, vannapurve@google.com, mail@maciej.szmigiero.name, kirill.shutemov@linux.intel.com, quic_eberman@quicinc.com, maz@kernel.org, will@kernel.org, qperret@google.com, keirf@google.com, roypat@amazon.co.uk, tabba@google.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam09 X-Rspam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ANR5QioyDRD3Rp47Ed99FqBdFe1+DeAhwL2YgqoqZIhR8qW7PBwMV+xWdP7Xw9o6C+Ujliu1ZwZC4Ravf+mt0FJd/5vsoR3OP8NKOf01YT+Uo1LukMuQAtSEQeR6AiRw9/dcO6Eh6cO0+iFteO3w1+YSN3RQbCsHmOP8IOK4qZobKxALpOc48vHh4kaAjtd4DkhkXhOLaYu6LV43WXp1frzsDyS8HPYLcMu7g8d1f+/AhV8tVON6uN1I9ZPQz1yGbANixKRSrTr37eAjY0SgTRfHM5cmkibRqmh4pidhHkWvoobb8f4Hbj5Pv7G48l1wxrirGYay+z+EqW8fDuPj4ghUKnxahOfPpJl5+sDfXiI1iIDROBzav7Y96zBsJu5gK925mojtkvp9/rjLw/hb+aPCK04MhabXEfmIE7PNVt0BCYSIvfHVrim4Kk0iRq3DhLVpV2odMPPsidsH5mocgR/bPEwm/M9R4hfhE1PLr7cByY/E476ELUsMdFlai41Y3V/U70lwxzcqH1JFCLyy6msV+oNqYoAJHNRHlkVbe3+BFOcuGZfQBjEwDEmS3bx5rkiPfJ1i0907p2xYsaRs88i250wTezYOCbvSt4erHiDnf1efczoBeKXTnQ0Wdp X-Bogosity: Ham, tests=bogofilter, spamicity=0.001103, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: Introduce and use folio_owner_ops
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index d58bd815fdf2..a64852280213 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3806,13 +3806,15 @@ static long demote_free_hugetlb_folios(struct hstate *src, struct hstate *dst, for (i = 0; i < pages_per_huge_page(src); i += pages_per_huge_page(dst)) { struct page *page = folio_page(folio, i); + struct folio *new_folio; page->mapping = NULL; clear_compound_head(page); prep_compound_page(page, dst->order); + new_folio = page_folio(page); - init_new_hugetlb_folio(dst, page_folio(page)); - list_add(&page->lru, &dst_list); + init_new_hugetlb_folio(dst, new_folio); + list_add(&new_folio->lru, &dst_list); } }