Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1089415ybs; Mon, 25 May 2020 07:00:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb92i33N+Q3ydKUlG1emoXFVqzrb/7H7OQdacOEnLrBw0TuKAwdAjhreinXsHWupa6tpJ6 X-Received: by 2002:aa7:d48d:: with SMTP id b13mr15578639edr.262.1590415211217; Mon, 25 May 2020 07:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590415211; cv=none; d=google.com; s=arc-20160816; b=z1ZQc+QMY8Xlo5xjdfC9rM8M5klKOYna+91zc3HnMvzZTDNS0y//KC4vHqCL7BUVJz fxIUMfkUjf3R1abiptdt5RFMy/UOxeRekPgG0qYqCK9ilEU7n9S6gGDWaXRUL6RA6MiC /w6tUTMfHcpe1xm6DPvA1xOEAYGYR6bRq99pEVchy76e1Gp88UVvW6ergJPp/6CZVrtX zeEagwevgYfkNtNYLPaPFTiD5EdsddKaUAzNHBd6TakvQ92dYMgxcmlBIU3WEjUCrMBD kOY5UPxDV9KJMGtAdTW4BmZwka8zgmF+VxnhHisDkulxxx6t5sFRBNHuxwz6ayntpPMw z3fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5qQiY+ZXVw5IFFJYnTIFYyj/ziMbEL19deOcInariiA=; b=KZOaU3CEf7AJj0iD5X5nSCbm5eLWVSL1V+/vzG+qoqBl7wQubc5YhhyWZYThdvg4vj ne6bwdJn0zFX/jshcsVM30Ct14q7WpzKZkWwsndWk58POVI2WgUPAssZ4lQB1TLwsqPR xJRAtAsykm8AHIO8F9Nx6Hy4Ntsl/THApm0iWBopZWMeY0DpymG6xpZZWkuOeGt6iM0a HqXJWxtCPFjrcqeKpOZOSA/sBSk6n6jfOHdLlm454mx/lsD/HMHqUZSiqZnTLNd7h0ev +HNKoZBpWgpWLhwnfe76dZ3NORQf8VX56QADWnUKzI2msUvU+IhsqT3P1toTqEeec66A 9eUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=s+rIPQDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gy12si9429199ejb.161.2020.05.25.06.59.47; Mon, 25 May 2020 07:00:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=s+rIPQDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403903AbgEYNzv (ORCPT + 99 others); Mon, 25 May 2020 09:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403805AbgEYNzu (ORCPT ); Mon, 25 May 2020 09:55:50 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E739C061A0E for ; Mon, 25 May 2020 06:55:50 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id x12so13771475qts.9 for ; Mon, 25 May 2020 06:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5qQiY+ZXVw5IFFJYnTIFYyj/ziMbEL19deOcInariiA=; b=s+rIPQDib3dWy7Qcs1M3vaRswSUZvO59bqqwm56bvqNnzsd4cGfc/7y1P/ukq2S2M3 PRgCBF4I5yOX75Y1qMGHQ9N7hpD66Xa2ylF+nsSHZz8eI/+R17sLGS34WG6yB1hnYtTn fxgQqHsvaLBcRm1G99YsDEQTL4oizD8LMOq/huB8wT3l24mnRuG0YjrjGeM61fQ7Yxm+ PxYDwaAhhug9Q3qyQPQNKrd0BIyQJNbC4QQNoLdQPKvIXkt5/9xKXKxiWrU5gmRF6gSm MvlWmdS1pugo0AAxExtGgv/BHg7s/CpyKeuTsDu4Txn9GcpG1IiEwgP5o/gSoah3gXe1 EeIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5qQiY+ZXVw5IFFJYnTIFYyj/ziMbEL19deOcInariiA=; b=PHaJHh8dnjqVOsNf7Heaqj5wTGJvb9EQNtyNfpJ5A8JVI6vpPiCuj6AOTDGIf16vDM rxt+3azMpOA4CPuEseoXtBwnuXDkuLa4K3D1Xp79sIfSRyeGec36Yo0cxfCgqhRPCBI6 5rxRIt4j39vTUhb/l4G/LRpSrwRl1ZhDQFnlQl48R8RnQLqi+Yt9jzoaIeH2j/gwSXrN ippxAoo7csy071gj4umypuVuwut0iiG8pxynXEHxzsNYybeXt/+9bEejYXfRfsK0in3J mi3qzBHH7A6+DS5Rtaf0t0H5VvI6VEu6RCAuiCtTXRPzQCBQ5NeJcydTAE4al2fgpfqy EnIw== X-Gm-Message-State: AOAM533pYkShE+/pUmSzBiLOEZ5WVClDlxeKqQiUHqgIPbDZ4DF/wZkb yD8+WQx2YzYLpRlXCin4LthDMw== X-Received: by 2002:aed:3f55:: with SMTP id q21mr14482318qtf.190.1590414947129; Mon, 25 May 2020 06:55:47 -0700 (PDT) Received: from ovpn-112-169.phx2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id e34sm15059240qtb.21.2020.05.25.06.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 06:55:46 -0700 (PDT) Date: Mon, 25 May 2020 09:55:40 -0400 From: Qian Cai To: Yang Shi Cc: kirill.shutemov@linux.intel.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC linux-next PATCH] mm: khugepaged: remove error message when checking external pins Message-ID: <20200525135540.GA18914@ovpn-112-169.phx2.redhat.com> References: <1589317383-9595-1-git-send-email-yang.shi@linux.alibaba.com> <20200521145644.GA6367@ovpn-112-192.phx2.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521145644.GA6367@ovpn-112-192.phx2.redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 10:56:51AM -0400, Qian Cai wrote: > On Wed, May 13, 2020 at 05:03:03AM +0800, Yang Shi wrote: > [] > > mm/khugepaged.c | 24 +++++++++++++++++------- > > 1 file changed, 17 insertions(+), 7 deletions(-) > > > > diff --git a/mm/khugepaged.c b/mm/khugepaged.c > > index 1fdd677..048f5d4 100644 > > --- a/mm/khugepaged.c > > +++ b/mm/khugepaged.c > > @@ -602,12 +602,6 @@ static bool is_refcount_suitable(struct page *page) > > if (PageSwapCache(page)) > > expected_refcount += compound_nr(page); > > > > - if (IS_ENABLED(CONFIG_DEBUG_VM) && expected_refcount > refcount) { > > - pr_err("expected_refcount (%d) > refcount (%d)\n", > > - expected_refcount, refcount); > > - dump_page(page, "Unexpected refcount"); > > - } > > - > > return page_count(page) == expected_refcount; > > } > > mm/khugepaged.c: In function 'is_refcount_suitable': > mm/khugepaged.c:575:25: warning: variable 'refcount set but not used [-Wunused-but-set-variable] > int expected_refcount, refcount; > ^~~~~~~~ > > --- a/mm/khugepaged.c > +++ b/mm/khugepaged.c > @@ -572,9 +572,8 @@ static void release_pte_pages(pte_t *pte, pte_t *_pte, > > static bool is_refcount_suitable(struct page *page) > { > - int expected_refcount, refcount; > + int expected_refcount; > > - refcount = page_count(page); > expected_refcount = total_mapcount(page); > if (PageSwapCache(page)) > expected_refcount += compound_nr(page); Andrew, can you squash this fix?