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=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 245ACC4CECF for ; Mon, 23 Sep 2019 16:39:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DA9C62089F for ; Mon, 23 Sep 2019 16:39:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R858SkgO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA9C62089F 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 6627A6B0006; Mon, 23 Sep 2019 12:39:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6133A6B0008; Mon, 23 Sep 2019 12:39:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 529AD6B000A; Mon, 23 Sep 2019 12:39:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 31C966B0006 for ; Mon, 23 Sep 2019 12:39:17 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id C7193181AC9C4 for ; Mon, 23 Sep 2019 16:39:16 +0000 (UTC) X-FDA: 75966745512.21.fear76_6e0b2b115d83b X-HE-Tag: fear76_6e0b2b115d83b X-Filterd-Recvd-Size: 5985 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Sep 2019 16:39:15 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id h144so35000351iof.7 for ; Mon, 23 Sep 2019 09:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RFFieyhD7JzCXe5ifm6amcb6+lfbnrSI8cAPQ36MW7I=; b=R858SkgO5YchV55UFuoykyOJ1d6HANKAKcyNyXSnFjlDxWsun6RWo/szs6mFJe3Gl7 SpP8oCIxZAzjM/+mZzbvhek60QM+vQZHmgd6exOWOQ1rxiMl1xshylLYEEfBAIaAMWij x17aBb18cOyd7Gg7jK7CY1adHHq+3GNeBb3vmLGvWhmMy13uO5l0VWhyyBV6WJQv0V4B oHsBuvX5GMOyTZdaE6GRZMK00UfWpjPcuIlrVD0sbAPdGTfcZrfg/SegWSPVy3b6T3s9 rAjNxT2QY7bGNbKEXSyko1pUSYiwD2IyNLRIo+29fcBqwwXyf2UpdDm4+eCsUdBcDf0M NGnQ== 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=RFFieyhD7JzCXe5ifm6amcb6+lfbnrSI8cAPQ36MW7I=; b=SUuS7XiDerjIFkxJWvgNfyMErjqbLydMYJv75deRoQ/QnPKkXX4NTpv/tuqibnq3fr laOTg2xukKaWPPrM0KukM9xEaNFJ7cxkCCT9zf8nRrU0HmS4wpiyoo5Bp4aueSPeugLR QfAiLVVqGo2lxA0y3dvH4/u9uJT/Gz9p3FCX9XUPw5HK5KS37+aJjpR9vLXZZjkDVexx 3XAEHsonKINL7/UWBwZ8QWCgHYGZ4MGlmw08zKNUr54AW4le+4QtWlgrx0+oQ8P4MJi0 B5IRp3QU32zNVcgbWAXfadCopJNagt3cdkQtBQDFbcStXy7Q6EtZmbLFOvK0qYznGQgM yYgA== X-Gm-Message-State: APjAAAX6GHFP1q7NiWGKtEGHLBOLk4a2jplSI5fL+Z5Sich2Qwqj6OIM 9r+q8574wpLSCylv/yS8ERXiIIedd7KUkryMBGM= X-Google-Smtp-Source: APXvYqy3q7z0+B3zJnmH5mJA6m7Vv33JAsSr6VocMaurzTxah7VBiRqRJR2aBGpPsIduojTBLoR7xf0CVw90j+76/ro= X-Received: by 2002:a02:246:: with SMTP id 67mr278140jau.121.1569256755054; Mon, 23 Sep 2019 09:39:15 -0700 (PDT) MIME-Version: 1.0 References: <20190918175109.23474.67039.stgit@localhost.localdomain> <20190918175249.23474.51171.stgit@localhost.localdomain> <20190923041330-mutt-send-email-mst@kernel.org> <20190923105746-mutt-send-email-mst@kernel.org> <20190923113722-mutt-send-email-mst@kernel.org> In-Reply-To: From: Alexander Duyck Date: Mon, 23 Sep 2019 09:39:03 -0700 Message-ID: Subject: Re: [PATCH v10 3/6] mm: Introduce Reported pages To: David Hildenbrand Cc: "Michael S. Tsirkin" , virtio-dev@lists.oasis-open.org, kvm list , Dave Hansen , LKML , Matthew Wilcox , Michal Hocko , linux-mm , Vlastimil Babka , Andrew Morton , Mel Gorman , linux-arm-kernel@lists.infradead.org, Oscar Salvador , Yang Zhang , Pankaj Gupta , Konrad Rzeszutek Wilk , Nitesh Narayan Lal , Rik van Riel , lcapitulino@redhat.com, "Wang, Wei W" , Andrea Arcangeli , Paolo Bonzini , Dan Williams , Alexander Duyck Content-Type: text/plain; charset="UTF-8" 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 Mon, Sep 23, 2019 at 8:46 AM David Hildenbrand wrote: > > On 23.09.19 17:37, Michael S. Tsirkin wrote: > > On Mon, Sep 23, 2019 at 08:28:00AM -0700, Alexander Duyck wrote: > >> On Mon, Sep 23, 2019 at 8:00 AM Michael S. Tsirkin wrote: > >>> > >>> On Mon, Sep 23, 2019 at 07:50:15AM -0700, Alexander Duyck wrote: > >>>>>> +static inline void > >>>>>> +page_reporting_reset_boundary(struct zone *zone, unsigned int order, int mt) > >>>>>> +{ > >>>>>> + int index; > >>>>>> + > >>>>>> + if (order < PAGE_REPORTING_MIN_ORDER) > >>>>>> + return; > >>>>>> + if (!test_bit(ZONE_PAGE_REPORTING_ACTIVE, &zone->flags)) > >>>>>> + return; > >>>>>> + > >>>>>> + index = get_reporting_index(order, mt); > >>>>>> + reported_boundary[index] = &zone->free_area[order].free_list[mt]; > >>>>>> +} > >>>>> > >>>>> So this seems to be costly. > >>>>> I'm guessing it's the access to flags: > >>>>> > >>>>> > >>>>> /* zone flags, see below */ > >>>>> unsigned long flags; > >>>>> > >>>>> /* Primarily protects free_area */ > >>>>> spinlock_t lock; > >>>>> > >>>>> > >>>>> > >>>>> which is in the same cache line as the lock. > >>>> > >>>> I'm not sure what you mean by this being costly? > >>> > >>> I've just been wondering why does will it scale report a 1.5% regression > >>> with this patch. > >> > >> Are you talking about data you have collected from a test you have > >> run, or the data I have run? > > > > About the kernel test robot auto report that was sent recently. > > https://lkml.org/lkml/2019/9/21/112 > > And if I'm correct, that regression is observable in case reporting is > not enabled. (so with this patch applied only, e.g., on a bare-metal system) Thanks. For whatever reason it looks like my gmail decided to pop it out of the thread so I hadn't seen it yet this morning. I'll have to look into it. It doesn't make much sense to me why this would have this much impact since especially in the disabled case the changes should be quite small. - Alex