From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 245C9C433E0 for ; Fri, 12 Feb 2021 21:16:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B0B9C64E08 for ; Fri, 12 Feb 2021 21:16:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0B9C64E08 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 231D78D0092; Fri, 12 Feb 2021 16:16:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E16D8D0060; Fri, 12 Feb 2021 16:16:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D2E28D0092; Fri, 12 Feb 2021 16:16:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id EA9068D0060 for ; Fri, 12 Feb 2021 16:16:51 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AE3ED824805A for ; Fri, 12 Feb 2021 21:16:51 +0000 (UTC) X-FDA: 77810875422.03.hen35_4404f8327624 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 8778528A4EB for ; Fri, 12 Feb 2021 21:16:51 +0000 (UTC) X-HE-Tag: hen35_4404f8327624 X-Filterd-Recvd-Size: 3980 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 21:16:51 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id cv23so313452pjb.5 for ; Fri, 12 Feb 2021 13:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=M/V9sHCfr1P7mccIZjuFtNDI0XPkeWeQkaWblX7rzrU=; b=Novk5M0h1oNgDUgzlJk25bkItR0UvpHNxdt0a2DVs2STYka7XfgdWsO30SmM+kLjZ4 DleObURg+mXqHj8gp6H+/k8UVgDFNP5NqMKOnmreImU1yDjOEP4471Z43GPN+ldyofox iBCf5OvX30jFvI/Nt03rcVmj+YbRaMx2xlVr2GUptdNeHfVhI9Dmbjajx4A140CoM3EN rjwWvA9mDFj12bF7YNJo6d+hmKUfjVkkVtaPzdh2/vMxL9juIqQsWQdCr/g7oolNHkYX Z0I2ITemWIQqFGy/+YoeOwj9+UAl4t2vJQO81rUu0xKQtd8nY77dWM7gNO3uf8wJW+t1 37/g== 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:in-reply-to:message-id :references:mime-version; bh=M/V9sHCfr1P7mccIZjuFtNDI0XPkeWeQkaWblX7rzrU=; b=HslmRu2ImOf5TUIHRzkMs3yuLFPzNV3qLqUU0RPj5+3SuJktPkpCbyzDNVGyBdgdXo fCJ8nBLlzsEghe1jrR/npZk6QotCISAYCYnU4x4Fsb3A/IXSj5Lg0S4K375kYIRoAxap yThxKlzZKv5VKg67+1GoUuWayw91y8DYgxHVwwIFRcrWklbIFotI6zaQMcQKm9DICxPi ApPDtZ3DS3PbomWeEoT45bSEx2qt3OzJgAs/71ecB3wCGylPk5j/WR6wyn8mU341FgqO Jpt6GkiTr9+wX8NfRO/P12VORhSpf7k8xOOdLcDfWGXz0PIib8T7cByLIT0e/bwvhfqf v1lw== X-Gm-Message-State: AOAM530ehUjI5tHh0woAGHFRDLjOujaxXAXVBug/I62sNo2fyLVj2bBg kWlgtdj3SoPuHJnCRoKhuvTmDC30TDLDLQ== X-Google-Smtp-Source: ABdhPJwnHIL/mZk6gNgm6uW6ZGCLnfRfNCRUAEqBKwD/QJDdiAR3/bxVQy1yBlxAuMhfeWJoyxFRTg== X-Received: by 2002:a17:90a:c686:: with SMTP id n6mr4280017pjt.82.1613164609859; Fri, 12 Feb 2021 13:16:49 -0800 (PST) Received: from [2620:15c:17:3:b175:9ecb:5cdc:43e5] ([2620:15c:17:3:b175:9ecb:5cdc:43e5]) by smtp.gmail.com with ESMTPSA id bk12sm8949655pjb.1.2021.02.12.13.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 13:16:49 -0800 (PST) Date: Fri, 12 Feb 2021 13:16:48 -0800 (PST) From: David Rientjes To: Charan Teja Reddy cc: akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, vinmenon@codeaurora.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] mm: compaction: update the COMPACT[STALL|FAIL] events properly In-Reply-To: <1613151184-21213-1-git-send-email-charante@codeaurora.org> Message-ID: References: <1613151184-21213-1-git-send-email-charante@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: On Fri, 12 Feb 2021, Charan Teja Reddy wrote: > By definition, COMPACT[STALL|FAIL] events needs to be counted when there > is 'At least in one zone compaction wasn't deferred or skipped from the > direct compaction'. And when compaction is skipped or deferred, > COMPACT_SKIPPED will be returned but it will still go and update these > compaction events which is wrong in the sense that COMPACT[STALL|FAIL] > is counted without even trying the compaction. > > Correct this by skipping the counting of these events when > COMPACT_SKIPPED is returned for compaction. This indirectly also avoid > the unnecessary try into the get_page_from_freelist() when compaction is > not even tried. > > There is a corner case where compaction is skipped but still count > COMPACTSTALL event, which is that IRQ came and freed the page and the > same is captured in capture_control. > > Signed-off-by: Charan Teja Reddy Acked-by: David Rientjes