Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp139460pxv; Wed, 30 Jun 2021 17:09:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL982tlbsf7OdzcSKfWUqw1YYDXdtMKlIrzwpfvRSyfFZ8hzvpQ7NIZ37mc0H0EmWwpeHv X-Received: by 2002:a92:9509:: with SMTP id y9mr27876575ilh.18.1625098196150; Wed, 30 Jun 2021 17:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625098196; cv=none; d=google.com; s=arc-20160816; b=s5fl2NaImAgGQZbAeU7sqVf7hESMTJjJMcNo4/uKqpqZsx03GCSd8KxJBjithgka/l 4PzeOeniaSoTqMduuvgUG8phlMZgf7wqvvAnFv2tAXV8qNgz2r0KGT3ojgIBHzfAPklP 8oxzN8nHkidkJNqc05wGEGv2gUd1A5QRtJiFm2couNcgPUQ8/Zponay1rPi1sXIyOX5o PqVP6L5rqNwIVlI0Uq9KI+WBenQYi8tv7iuK8C8yQqPVWwj9zxjhWfv9tkA2XpjCaGCN 5kg3OjuYwOFr2mmG3DuLXzKpOGLBn3Rjri3STRPKAciowx1XByQ67z6Ts34kLxKesvBf yhvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0vibCQHRcBzovbP098YQJ8mdWoX2J5W8wiaM7M9niEQ=; b=s1+3c/7k8FK1qncyi0D6TmXDs+VC6YEQXRhDdA1CSAqGy/SBYnZSRayN3m0PNceyuQ gUHnzhcb4/UD1bd3OxC4UjwcaU8BJso1LOeiti1pPSHJ+cR3p4JpTzhMK/aRBw1ruZ4C wn7t2LXvuVqBxDzlReLjEo8tJ3c/Go8F7DlYqgAaxaae0aYJaQvovTflGSq/5FuEjtGw mjXmEE/EdMnxualeBFopumdbxQ8BLXyW5SkvaI0HVJRiRx9zU2X1Zu4tvzwZUi/3GzEF YyCJIG3C+JOQQeZM1BW9xfbEiWigTMY0deECD/Zl4WS9ucfYUjcQnVjn6CMpf999u0Es pN/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e+BOa5lV; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si29379178ilh.98.2021.06.30.17.09.31; Wed, 30 Jun 2021 17:09:56 -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=@google.com header.s=20161025 header.b=e+BOa5lV; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbhGAAKg (ORCPT + 99 others); Wed, 30 Jun 2021 20:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236647AbhGAAKf (ORCPT ); Wed, 30 Jun 2021 20:10:35 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11967C061756 for ; Wed, 30 Jun 2021 17:08:05 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id a11so8350810lfg.11 for ; Wed, 30 Jun 2021 17:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0vibCQHRcBzovbP098YQJ8mdWoX2J5W8wiaM7M9niEQ=; b=e+BOa5lVh8fknuCBWWZJqvx/9unwfYZPGN/BgA6mFJfxXAR3MsYl2UaPqSISg1aemm CckSbHg9T6n+da7WWFpBAZ19uz/mPHl35kTBjAfx3HZ5AJVbYw6XF5KDLJKf5+8dyYf0 eC0MVxMARYtz4R3YUWDRwpdZXUTpJcXAbenKfunsIzgQm82ewVZHwtcsg66USaN7rrs7 Gef0I9NiO3dD+8MHYvBRjrZV8WGIaZ4pu3o85U2v/VMGVXzlsGf91B0I4berjf8tusiK 5SC0NWeI+yuxx9nZHdRM4gFyh/an4RKZOi7AhehE7juhNmVlPDCFBUO3rbEyg87sW8lS jtQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0vibCQHRcBzovbP098YQJ8mdWoX2J5W8wiaM7M9niEQ=; b=Bo2mnCqN0hvsfMsIINN81HXZrSFzOkXHrO9y6A7jQ//DPE1yorOZAWBlwhgtiNVXqz 7sqk7/kESik40ixl8758pGltDRXUQRtryYZ1eTeZPFMt1rjVseaS5U87J1gQ9+W5bdD5 aso1/xh/mJzkX3GbNT59GPVkdrzH02Fh7iYvEZ/Nvz4YJ8c/RRGF0LEci+0D1vkWJYzP q8z7MLRnlgVbSZNkAOQV1a2nvw1qGmtBet3K+cSy2OYxh+yIvWhU6JCyOT3DRKIVzdE+ qxZiBeAGsp1lc16EZ2cmVhcZpNxYxtkvcpNtLkrf23sxEKVzkk7yOllUX+wHPicafjPw yZVA== X-Gm-Message-State: AOAM532D7O8TJvqM/lffMR+3gzV1e7sqz4COLtxyWGOe7VplNcnlnkiK +inOsupK7j5CMg6AzAoL9Vt45Y8rg02Zh5ZBbwyTpw== X-Received: by 2002:a19:5016:: with SMTP id e22mr16576212lfb.299.1625098083067; Wed, 30 Jun 2021 17:08:03 -0700 (PDT) MIME-Version: 1.0 References: <20210628133355.18576-1-sj38.park@gmail.com> <20210628133355.18576-4-sj38.park@gmail.com> In-Reply-To: <20210628133355.18576-4-sj38.park@gmail.com> From: Shakeel Butt Date: Wed, 30 Jun 2021 17:07:51 -0700 Message-ID: Subject: Re: [PATCH v32 03/13] mm/damon: Adaptively adjust regions To: SeongJae Park Cc: Andrew Morton , SeongJae Park , Jonathan.Cameron@huawei.com, acme@kernel.org, alexander.shishkin@linux.intel.com, amit@kernel.org, benh@kernel.crashing.org, Brendan Higgins , Jonathan Corbet , David Hildenbrand , dwmw@amazon.com, Marco Elver , "Du, Fan" , foersleo@amazon.de, greg@kroah.com, Greg Thelen , guoju.fgj@alibaba-inc.com, jgowans@amazon.com, Mel Gorman , mheyne@amazon.de, Minchan Kim , Ingo Molnar , namhyung@kernel.org, "Peter Zijlstra (Intel)" , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , Shuah Khan , sieberf@amazon.com, snu@zelle79.org, Vlastimil Babka , Vladimir Davydov , zgf574564920@gmail.com, linux-damon@amazon.com, Linux MM , linux-doc@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 6:34 AM SeongJae Park wrote: > > From: SeongJae Park > > Even somehow the initial monitoring target regions are well constructed > to fulfill the assumption (pages in same region have similar access > frequencies), the data access pattern can be dynamically changed. This > will result in low monitoring quality. To keep the assumption as much > as possible, DAMON adaptively merges and splits each region based on > their access frequency. > > For each ``aggregation interval``, it compares the access frequencies of > adjacent regions and merges those if the frequency difference is small. > Then, after it reports and clears the aggregated access frequency of > each region, it splits each region into two or three regions if the > total number of regions will not exceed the user-specified maximum > number of regions after the split. > > In this way, DAMON provides its best-effort quality and minimal overhead > while keeping the upper-bound overhead that users set. > > Signed-off-by: SeongJae Park > Reviewed-by: Leonard Foerster > Reviewed-by: Fernand Sieber Acked-by: Shakeel Butt