From patchwork Wed Feb 14 06:05:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinsey Ho X-Patchwork-Id: 200815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1014884dyb; Tue, 13 Feb 2024 22:07:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHp8V/biR8kfTyfix6yyOp/EsI4LHnzkv+kodWr9MSSGvXYD3F6615eRTDIriUKfPbEP3lGF8koo1NxiDyfKSgmv9t5A== X-Google-Smtp-Source: AGHT+IH8E+aqQ8QcYkaM8DzhWyPV4P0S8WdER7q9pqE7a23emFswzqJ47dnjn5REKLeGMnTumuER X-Received: by 2002:aa7:c541:0:b0:562:1a77:19a7 with SMTP id s1-20020aa7c541000000b005621a7719a7mr855150edr.11.1707890851031; Tue, 13 Feb 2024 22:07:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707890851; cv=pass; d=google.com; s=arc-20160816; b=M8YrLTzTQzutDt8k0SIJaMk7rda/answkUtJL/LRfbjCN7hAkiyOcEcJQFSyaDzG6c 88TanldGZ53j2bOy15pv3HexYW2LGOXFUZQtJc9+PxHoNabF/hKbXD4yUHANWM33a6D2 n0oggbFSUqrjLgH4uZUL5uDRBKZov7szWRI3bzXmdYDVJ31NKA7V1L2bt3Vm7DbSFLKG MKQyheIqNkaN/QEuu4si+24H4ijdqrbY5+9/HOPaMgaHx4Rj1Z3lXol8Upq+TZdWoZL2 8CQ76XXt9hBaWoHhYCW8HDDrcvKttoAKduAELdvRaeCYVh0NetzZLRBKzEIgmsvTKFdy B76g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=PA0Wvzy3nOg04HsvD1HxZoLNsuEGHVAo5nrJURoHvxc=; fh=8O5RabfpiVksizK3eckx5Un926UppoHvdUCYVQ6fFc0=; b=TRigoneIL3Sg4Vuc9/LCc1NKYIv2YsN4Np0O0E7KUUn/KuMTxjxTMpXCaIW3ewpitB FBPSdDv/wIhc6UqFPrxRZHSR8SH6agRQ1FyllWh5ZY0qTahGBWkqtfvQwIfv0efabeIW JFzLZW9eyofaeVZEL/HibXgZbs7pBF6/LnfuiKUkfITWJew93+RkTuPY2w75yg0AJDQb ewj84aVqyiegZZhu4arYIywBlnaMLZn/m2ys+zPqMjW8YWck6+1UkHo0omHswOwrl9Ro NW9vXN4GeuenhvEESFZ5wS6sza+V6eGknBcSMCQNIt+ZUqT5pFHFhunyGsS0HhHHUTaT 20BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="feM/altA"; arc=pass (i=1 spf=pass spfdomain=flex--kinseyho.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64767-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64767-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCXWoURzkk9n4kkH+UhqvEqNRbOJnp6xTIU0z0TCVW0hJojbim2kA1SIlFkL3B4KSGSM/iXKJqLHB45qvSRhy63xwE+2yw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y19-20020a056402135300b0056022a0d6e5si4515529edw.466.2024.02.13.22.07.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 22:07:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64767-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="feM/altA"; arc=pass (i=1 spf=pass spfdomain=flex--kinseyho.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64767-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64767-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A36501F285AE for ; Wed, 14 Feb 2024 06:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0205A11CAD; Wed, 14 Feb 2024 06:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="feM/altA" Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDE7F11184 for ; Wed, 14 Feb 2024 06:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707890761; cv=none; b=iaVcNiNMyxxKMnc2INzz/t1/i0Pujakd530Du32eivXX6ozm0j4T3dAqiE8dXW8T1O7oMxGGPP5mjoVGpvXBPFVEV1G3eNlEtCDMijmruO7H9ASwG1IGTzB0LB3YZrbcBNWjX977PMhjh1wJvsTfop97TiTdP+enurisLOG/Oyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707890761; c=relaxed/simple; bh=iEbHcbHJ+9bB3Sa9kRTJ4KWMBUFabcdRFDkuVsMtWKQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FWRaw1xTYE/KsyNB202Y/O7MM9BKJVbHUwjNGbDnZlWJ/x6I8hhv6fkylw7j/vsyT64F6EadT2TzxCe8FvodnizAPZzdr8cRdHa5tejQLKYjIkd+jCv0jnhM1MnNYaN7kJWEN7QlQw/qbmzhSVpKW5DBiRXHwpUzG8itpv8KiEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--kinseyho.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=feM/altA; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--kinseyho.bounces.google.com Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-1d409124358so51042715ad.1 for ; Tue, 13 Feb 2024 22:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707890759; x=1708495559; darn=vger.kernel.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=PA0Wvzy3nOg04HsvD1HxZoLNsuEGHVAo5nrJURoHvxc=; b=feM/altAcmvKtvSZnjX8wLBL9s8JtK9fcFijOJekIbUXl+nVoP46azKtCp4ZvnXxBJ fluPcugcHXuJQ1rG1b6dgSXD4haI1WBFPLO0aW9fqKeQcjV7i2tErzlAaH63b2sF5PNJ Z2JAN1IkIaB6knI4pSDDH/tlBHT01bUYBQDZl3u/vYE5JDzycSOqW3Erel0Rr/i1EVsP xcEsW+zIPeSS0xInjsAIr75p7LIDVdZ1yZRMzwHQ7O5C3v8C5A4W/leXA3QqaiV+69Uo APzaCzMwE0v6Dx3eeWE05M0rpKtTEsiZgNRy0dUEE8O7/Zu6CwSRLXzfwY12wAepGXUj RCNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707890759; x=1708495559; 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=PA0Wvzy3nOg04HsvD1HxZoLNsuEGHVAo5nrJURoHvxc=; b=oN8FDCU35dE5vATIKKjKKKg9nZqJDjioYZJwGUhH2LW4dHMAaT27XbHtGWAfUtBERw xdPBwlrCoxArkYCH+FRTaWu3AcyWLei5mKV4wPLvTHNH2NhQKvd80HtWSjqWY7bH72XY 0nP3ERmqPjubiuiCwb+VKeK0e4xAW2/2/xvw4nexp+Ynumuu8JEqhSVMJVmHzSfS+C5y AhJl1Rb37Czu4Vk+lMwEAXGu8Dp+oJejniFYdkPRF2pPGeJwpUsxXvSrqGsGo4qBsye6 cZqTe/7ea/KI50PQXiav9GAt2EDy9OEfjL52wzdIKTo6/60rxDQxqGnlmEpsmSrR0O++ cQZw== X-Forwarded-Encrypted: i=1; AJvYcCVeDrJGPiQE+38JvyP9EHcusG2ohjQCY9GW4uHaKrLrRU9ODiEwtynPb3NNEg2g8rNeiXZMNTH8Q0rCL8g54l1+Bw7CrROJ7MvwMJH7 X-Gm-Message-State: AOJu0Yzzuiezu5KNKm3ontvMrMBUYnpxlV58tGEC22kvQlI/GcXp6QYo hqgsBm2iTkXi4Bbt9x6arGtgo3H1tgUBZBQR+dm9UlWw/g/dLgqn4l7xGHBI+PyQiGH/mfddESF fssu/EGMsqg== X-Received: from kinseyct.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:46b]) (user=kinseyho job=sendgmr) by 2002:a17:902:ea11:b0:1db:6187:61d7 with SMTP id s17-20020a170902ea1100b001db618761d7mr9768plg.13.1707890759283; Tue, 13 Feb 2024 22:05:59 -0800 (PST) Date: Wed, 14 Feb 2024 06:05:34 +0000 In-Reply-To: <20240214060538.3524462-1-kinseyho@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240214060538.3524462-1-kinseyho@google.com> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Message-ID: <20240214060538.3524462-2-kinseyho@google.com> Subject: [PATCH mm-unstable v1 1/5] mm/mglru: drop unused parameter From: Kinsey Ho To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yu Zhao , Donet Tom , "Aneesh Kumar K . V" , Kinsey Ho X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790853357291071611 X-GMAIL-MSGID: 1790853357291071611 struct scan_control *sc is currently passed into try_to_inc_max_seq() and run_aging(). This parameter is not used. Drop the unused parameter struct scan_control *sc. No functional change. Signed-off-by: Kinsey Ho --- mm/vmscan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 54cb7685beba..9d15648561ec 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3834,7 +3834,7 @@ static bool inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, } static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, - struct scan_control *sc, bool can_swap, bool force_scan) + bool can_swap, bool force_scan) { bool success; struct lru_gen_mm_walk *walk; @@ -4690,7 +4690,7 @@ static long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, bool return nr_to_scan; /* skip this lruvec as it's low on cold folios */ - return try_to_inc_max_seq(lruvec, max_seq, sc, can_swap, false) ? -1 : 0; + return try_to_inc_max_seq(lruvec, max_seq, can_swap, false) ? -1 : 0; } static bool should_abort_scan(struct lruvec *lruvec, struct scan_control *sc) @@ -5350,7 +5350,7 @@ static const struct seq_operations lru_gen_seq_ops = { .show = lru_gen_seq_show, }; -static int run_aging(struct lruvec *lruvec, unsigned long seq, struct scan_control *sc, +static int run_aging(struct lruvec *lruvec, unsigned long seq, bool can_swap, bool force_scan) { DEFINE_MAX_SEQ(lruvec); @@ -5365,7 +5365,7 @@ static int run_aging(struct lruvec *lruvec, unsigned long seq, struct scan_contr if (!force_scan && min_seq[!can_swap] + MAX_NR_GENS - 1 <= max_seq) return -ERANGE; - try_to_inc_max_seq(lruvec, max_seq, sc, can_swap, force_scan); + try_to_inc_max_seq(lruvec, max_seq, can_swap, force_scan); return 0; } @@ -5433,7 +5433,7 @@ static int run_cmd(char cmd, int memcg_id, int nid, unsigned long seq, switch (cmd) { case '+': - err = run_aging(lruvec, seq, sc, swappiness, opt); + err = run_aging(lruvec, seq, swappiness, opt); break; case '-': err = run_eviction(lruvec, seq, sc, swappiness, opt);