Message ID | 20230713042037.980211-20-42.hyeyoo@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1586964vqm; Wed, 12 Jul 2023 21:40:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGAzB6zkOXQEwC7bsm9QyQhAiI03mI3efPcXWzM/fIKR2oHf6QE5uVK8Hx2DtV32NjCX8Rc X-Received: by 2002:a05:6808:1b11:b0:3a1:de61:d414 with SMTP id bx17-20020a0568081b1100b003a1de61d414mr456087oib.51.1689223231129; Wed, 12 Jul 2023 21:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689223231; cv=none; d=google.com; s=arc-20160816; b=j1JEmgFdq0I82wn+rZOzXgVXCI6NvWJd46KIlonR750VMovVCKSAKkBkv6XGLo+fb8 JYOcrte5EhM/h5fIrGmHczl3fkJn/NxasTmJTBDM35H/4kGvZAJZ8883UcxUDoAepmFJ nQZOsN/lwke/07ByB7/07HNLFM9Fj6QQ/9aSC0T5xLt5EOj89LJDYtBRKaLQn7nJ/E0B sO81xkWB7Wu7Hx3FPEt4Whpvjg2YCW4jm6hkUZUV6bTCeBNTcXw4GEaXGEiBRkKbERfh 3DRs940VHB1MUCqQEn1HnxZnGD9WucohHYTGGuIMGWYJGZLJfAJG9ngmRm1zkCZdKPgA Mr6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xtrw/YzOEDonF+rRVmBrlDfCDCMTeOToGRvD9RY+bgk=; fh=/QsNaKhtZgVhH9aginPULJkva4OxUan3OolcTMonS78=; b=oaQXqH/A2Wt05FEVQYpFoEGTI5wnx3dxL6K+EsUblRDfLMtsgXq9qTEEDz2miRC6bl doE0b7kqaebLXFQrBHEUuetGjr15SKPyEbWJ++0l5OIFcFU2F+Af85mfF5pSja6OyHXC pa7YCCFyaOjBXqOvvUkomVze15svotfAS79GZMcgFpojEyblE3M4Aj42tg8Pb9HfXG8d oVoJE3xvWDlk140W2zUAKovVINheUhO1xPVeMnxWHC0x2QguFmT/uZip4t2VeYpHV8li dT0zN0OnpEA5SApKESy0AoegcvBl4OADTMoSLrrz6UyXnjAY+wh2+FXKueD7GSvdfeR0 c3+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DNDzJeH6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s68-20020a632c47000000b0055ae20ada77si4360793pgs.591.2023.07.12.21.40.18; Wed, 12 Jul 2023 21:40:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DNDzJeH6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233600AbjGMEXi (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 00:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233871AbjGMEXG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 00:23:06 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D97A3581 for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 21:22:03 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-666ecb21f86so296704b3a.3 for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 21:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689222109; x=1691814109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xtrw/YzOEDonF+rRVmBrlDfCDCMTeOToGRvD9RY+bgk=; b=DNDzJeH6+uO2QRQUtNKhlz1aZsrdHRQc3v19UspNEVteBUbKa34CxMu1dDwP8iKgHU 8KF0nWm/6lmyuE7xNphIGmx+lEgQI/KoUbLErDlzkhdMtelyMl9ecW/RcTK1ebr6VO9h WLouJWDpvzbelCRzOX01QxQExmmdG+26259mTxI+kZ14UISGq5hYvhWEt10B4jTr9Y8S E6P23Iy6hI+jrHrFx0fKwUEJQj40SaSOGcqSGfe3z9n/47iE46lajWhiuXM0lGeG7iM2 7WUKg2qQ+SjwVM/EDeGVwxsBI84kTuo9LnBmXX1lcyGbwIdXJ3ckrlw/RMp4VBjFps8m S7xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689222109; x=1691814109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xtrw/YzOEDonF+rRVmBrlDfCDCMTeOToGRvD9RY+bgk=; b=LX+At9Hguey0g+GW3niNd0PAv5DG5sV7yQ1z6fBWUH/izD1L87Cl38UXA9vMr5OQ8p OV/8aIeVm9XD3kndx/0R1YQ/aONvqDiWumIRQF9ojqXQNC689xpVNIdW28BOgANueHnf YBryPSneTZN86ptzCiUl0xKHRgpeXAmfoYj9S/31htJ29Jhs75lSLajQOqE4UJw0vQJB ExumhGohvx+8OL8fjGyMvincfw5PJi3poQ9L/hNGycL2J0aFAev+xc+4KBPdzuE4kClr x5MVsh1bgxHz7yChXZG7xpqwFsPhWM3F/nXWsA0dKsEC+LcTMkgb6yegT4drPfoBEVza bo6g== X-Gm-Message-State: ABy/qLZRMvyQf0icpoVR8VFxWpbMdXrlifp+091SVpeTCaWmi5Yu6F3r +HeaGrcEd1ekg6c7Ao5o6dU= X-Received: by 2002:a05:6a20:2585:b0:12f:aac7:6f83 with SMTP id k5-20020a056a20258500b0012faac76f83mr419599pzd.42.1689222108958; Wed, 12 Jul 2023 21:21:48 -0700 (PDT) Received: from fedora.. ([1.245.179.104]) by smtp.gmail.com with ESMTPSA id u18-20020aa78392000000b006827c26f147sm4346601pfm.138.2023.07.12.21.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 21:21:48 -0700 (PDT) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Matthew Wilcox <willy@infradead.org>, Mike Rapoport <rppt@kernel.org>, Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: [RFC PATCH v2 19/21] mm/zsmalloc: convert SetZsPageMovable() to use zsdesc Date: Thu, 13 Jul 2023 13:20:34 +0900 Message-ID: <20230713042037.980211-20-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230713042037.980211-1-42.hyeyoo@gmail.com> References: <20230713042037.980211-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771278939111454927 X-GMAIL-MSGID: 1771278939111454927 |
Series |
mm/zsmalloc: Split zsdesc from struct page
|
|
Commit Message
Hyeonggon Yoo
July 13, 2023, 4:20 a.m. UTC
Convert SetZsPageMovable() to use zsdesc.
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
---
mm/zsmalloc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 6cb216b8564a..5f07e3d92a99 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2117,13 +2117,13 @@ static void init_deferred_free(struct zs_pool *pool) static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage) { - struct page *page = get_first_page(zspage); + struct zsdesc *zsdesc = get_first_zsdesc(zspage); do { - WARN_ON(!trylock_page(page)); - __SetPageMovable(page, &zsmalloc_mops); - unlock_page(page); - } while ((page = get_next_page(page)) != NULL); + WARN_ON(!trylock_zsdesc(zsdesc)); + zsdesc_set_movable(zsdesc); + unlock_zsdesc(zsdesc); + } while ((zsdesc = get_next_zsdesc(zsdesc)) != NULL); } #else static inline void zs_flush_migration(struct zs_pool *pool) { }