Message ID | 20200325220309.9803-2-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=qMZt=5K=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53965913 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 25 Mar 2020 22:03:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2060F20719 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 25 Mar 2020 22:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b8hwkqNq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2060F20719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 58C096B000A; Wed, 25 Mar 2020 18:03:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5154E6B000C; Wed, 25 Mar 2020 18:03:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DFA56B000D; Wed, 25 Mar 2020 18:03:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 2703C6B000A for <linux-mm@kvack.org>; Wed, 25 Mar 2020 18:03:32 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 46BA15B7FB for <linux-mm@kvack.org>; Wed, 25 Mar 2020 22:03:32 +0000 (UTC) X-FDA: 76635261822.25.feast40_7628be7207234 X-Spam-Summary: 2,0,0,25e47902769700b8,d41d8cd98f00b204,richard.weiyang@gmail.com,,RULES_HIT:41:355:379:541:800:960:968:973:988:989:1260:1345:1359:1437:1534:1539:1711:1714:1730:1747:1777:1792:2393:2559:2562:2903:3138:3139:3140:3141:3142:3351:3867:3868:3870:3871:3872:4321:5007:6119:6261:6653:7514:7903:9413:9592:10004:11026:11658:11914:12114:12296:12297:12517:12519:12555:12895:13069:13311:13357:14181:14384:14394:14687:14721:21080:21444:21627:21666:30054:30070,0,RBL:209.85.221.65:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: feast40_7628be7207234 X-Filterd-Recvd-Size: 3512 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf44.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Wed, 25 Mar 2020 22:03:31 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id s1so5440591wrv.5 for <linux-mm@kvack.org>; Wed, 25 Mar 2020 15:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R49ssuqQGRjTcbw9XYqjygG4biZpQtMbehigwtsfjOM=; b=b8hwkqNqX/+hIC58/+o/jd+0hEIUCn6eGgDrCSTUGUo6c4fzZOYMEj37Roe2WBsIq2 zPqtqniduYl+UvmFPdYuneOUTIEcUghd16bL9IJqmhH7XZTTrtZuQfFuLW/rgoeJOIZi KioKbDKUOjj1HE5tnVJk5cA1RODuS8ThgUlXbJzegQlwTT2tHHyq166tWty1RcqiWiOA 4iVYzWAU/BjXIhlpyTreOQLqfAVOdvZkQrU15XbQbZof9bm3wZaUN34MCo6SojmQ5pSx U5iDZ6m7UARO56gdtaY4WIPX4f/p/P58rJaGF8PR5pXxxx/DuKqPmOlSyUprBt78MJkD zVAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R49ssuqQGRjTcbw9XYqjygG4biZpQtMbehigwtsfjOM=; b=PiFurs4ZA/VT2+F2rJL5zQ1k+1dKWSE13ryztUGn/zOVjSLhfZ6eUvl3LOHJk3cb4e BbRFiRh9SylKt+/JaUOjxl6uc0kG0Uc9wfOKNhN8rBXmeWEb94R6yqgPpiNYV3a/1JnK dNcnWGKvAUWWDHu8ZXT5GAgAv07B7l0TSPh18dx6hR+bgBC4Ktz5QJ2FQI56uuWe4DSv x24ILKkqdXntbtRXPxjj6LuqtTDepW2fHb/AKC8b001nRkdBvZfZ77Vcn1nfnKC8YbWY S+QNSO/H5Bdz5ztQ135uNc5HfJru8ipgD7P7XoObxy5GUnOn/UE+WtmPfYv8rwuWSeQY PEuA== X-Gm-Message-State: ANhLgQ2DWAdcbo7jvoXI3Q9xXBgrKI79HpF+5W/A0dOHRExVw0bOkJVd Z2O52+ZExMQ4k3CbUmDscIU= X-Google-Smtp-Source: ADFU+vts1LWIKOZxKckKm7jY1vK/lIgif1ns7ncn3MUnWWG+0Lwvm1lfxOUZoRF5sAbRYiKZPWNlrg== X-Received: by 2002:a05:6000:10d1:: with SMTP id b17mr5907386wrx.360.1585173810581; Wed, 25 Mar 2020 15:03:30 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id u8sm408952wrn.69.2020.03.25.15.03.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Mar 2020 15:03:29 -0700 (PDT) From: Wei Yang <richard.weiyang@gmail.com> To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang <richard.weiyang@gmail.com> Subject: [PATCH 2/2] mm/swapfile.c: remove the extra check in scan_swap_map_slots() Date: Wed, 25 Mar 2020 22:03:09 +0000 Message-Id: <20200325220309.9803-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200325220309.9803-1-richard.weiyang@gmail.com> References: <20200325220309.9803-1-richard.weiyang@gmail.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[1/2] mm/swapfile.c: simplify the calculation of n_goal
|
expand
|
diff --git a/mm/swapfile.c b/mm/swapfile.c index 85b151d73128..6b6e41967bf3 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -740,9 +740,6 @@ static int scan_swap_map_slots(struct swap_info_struct *si, int latency_ration = LATENCY_LIMIT; int n_ret = 0; - if (nr > SWAP_BATCH) - nr = SWAP_BATCH; - /* * We try to cluster swap pages by allocating them sequentially * in swap. Once we've allocated SWAPFILE_CLUSTER pages this
scan_swap_map_slots() is only called by scan_swap_map() and get_swap_pages(). Both ensure nr would not exceed SWAP_BATCH. Just remove it. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- mm/swapfile.c | 3 --- 1 file changed, 3 deletions(-)