Message ID | 20230418062503.62121-2-avromanov@sberdevices.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2622178vqo; Mon, 17 Apr 2023 23:34:27 -0700 (PDT) X-Google-Smtp-Source: AKy350YNmanzg5c6km+ccGIoXumPEv/yIKKHLB4rqMEDlVfSMtmIU0RuITzakRS8cblzL2wJeFKw X-Received: by 2002:a17:902:e80f:b0:1a6:46d7:77f0 with SMTP id u15-20020a170902e80f00b001a646d777f0mr1407233plg.0.1681799667338; Mon, 17 Apr 2023 23:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681799667; cv=none; d=google.com; s=arc-20160816; b=AGCLARmQyI2IaBl6JsPJdjNtD+oBTQHTLk/IA8dGovK+BrTnpMNkQ+uglx+Zc5g3Uo 5KzmkExx96fYpErcxl4i8H9zJt8B/rITuVz3mluNYWgsYfGRpKAyEkmC9wGzZ839OsXS 97AEQEaNtBRYYIlgYSSfqfGTKHrZPZfp56is1p0mRmQkd7TeOg9jnlFV0MiBx8ezRc8n PeCAlw028+g2xq1c+3HU0gKfIvaSp7UWKfat2uKAomL2msOsJCmh8oYaNbT3fTWxI0Gk VhVtU1Yq8YMzh1PYfqw8LDlhpfKolqRESff+I3EpNd13NfYdaoWbSk81Sj2H2LfpPnUS T56A== 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=4Bi0KK9m/M8I5xBIw0piOBV6vW2Jir8/WPsX0rbFo1k=; b=wo4c4pwzucoqDbHah1HrGA1WmpZvxBf2+BIO7U3NlvG694/t6taLRyjsv7cFNh2vrR ppjRebhiNhiWGNC4og1Fa8w4Oj86QLWYYnW2rcjwFJwKzA+W9mnprJiFCY5gmmHX9vmW 05CGfpFgdS9EVdG1TTXyQjpKcc/sI3t7dqH1fFelE/9DWoBF7j0Zi0KelG4NdUShOvBc EsGC8q1E85YcTB5wNtYW2qwU2L22u9KXIAety7YueY6zkz69NpcIHxaedLsg7yuXfuL8 ajHsUWq5IBYh0B6l3VLdzMzvTgpasCgtrUe2j6xWdK5BqqgVvxUpGTSS+AHoK3sbrz1y /jTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=bQF8kwlL; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu11-20020a17090b388b00b002474701edc0si11143627pjb.188.2023.04.17.23.34.12; Mon, 17 Apr 2023 23:34:27 -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=@sberdevices.ru header.s=mail header.b=bQF8kwlL; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbjDRGZT (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Tue, 18 Apr 2023 02:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjDRGZR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Apr 2023 02:25:17 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D10E1BD8 for <linux-kernel@vger.kernel.org>; Mon, 17 Apr 2023 23:25:15 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 92E2F5FD0A; Tue, 18 Apr 2023 09:25:12 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681799112; bh=4Bi0KK9m/M8I5xBIw0piOBV6vW2Jir8/WPsX0rbFo1k=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bQF8kwlLnIL4gFlxGkjrHhSyOwxOthrfF5p7DqK7gxSGzrvCc+CuZ1WQqZa6feozl CgjmBHR/JufPBhpEhvo/gwUwJnSbysPWxaOl0NPKpjXS4UZ2wR8PcKEzRm4e74mnlP fJlBXog9u1ouVP3crp7QapLLlqnUDlDMG65Dc/1s9zl6fKek20B0c6ETveiYgiYloo JC2v749RnUTyv/q9LM/cjW+0u/GCxAhyhjR7gu/tYSqULeDQFz7tBCe9oBcblZzaPr mDyIk4nHDeBNNKOiKjew2s0zbQg0xrP8Vd6+yZk5teXivy6b3eJ2KSlMPQ6u6idwB4 kdH8DXp2vZoDw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 18 Apr 2023 09:25:12 +0300 (MSK) From: Alexey Romanov <avromanov@sberdevices.ru> To: <minchan@kernel.org>, <senozhatsky@chromium.org>, <akpm@linux-foundation.org> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <kernel@sberdevices.ru>, Alexey Romanov <avromanov@sberdevices.ru> Subject: [RFC PATCH v1 1/5] mm/zsmalloc: use ARRAY_SIZE in isolate_zspage() Date: Tue, 18 Apr 2023 09:24:59 +0300 Message-ID: <20230418062503.62121-2-avromanov@sberdevices.ru> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230418062503.62121-1-avromanov@sberdevices.ru> References: <20230418062503.62121-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/18 02:02:00 #21122658 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763494768168198890?= X-GMAIL-MSGID: =?utf-8?q?1763494768168198890?= |
Series |
Introduce objects folding mechanism
|
|
Commit Message
Alexey Romanov
April 18, 2023, 6:24 a.m. UTC
Better not to use hardcoded constants.
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 702bc3fd687a..f23c2da55368 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1888,7 +1888,7 @@ static struct zspage *isolate_zspage(struct size_class *class, bool source) fg[1] = ZS_ALMOST_EMPTY; } - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_SIZE(fg); i++) { zspage = list_first_entry_or_null(&class->fullness_list[fg[i]], struct zspage, list); if (zspage) {