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=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 C8F34C4CEC4 for ; Mon, 23 Sep 2019 15:50:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F1DB20882 for ; Mon, 23 Sep 2019 15:50:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F1DB20882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 131376B000A; Mon, 23 Sep 2019 11:50:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E1306B000C; Mon, 23 Sep 2019 11:50:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F12596B000D; Mon, 23 Sep 2019 11:50:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id CEDFB6B000A for ; Mon, 23 Sep 2019 11:50:42 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 6B790824378E for ; Mon, 23 Sep 2019 15:50:42 +0000 (UTC) X-FDA: 75966623124.28.color32_7a78e0d744344 X-HE-Tag: color32_7a78e0d744344 X-Filterd-Recvd-Size: 6114 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Sep 2019 15:50:41 +0000 (UTC) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD05481DE8 for ; Mon, 23 Sep 2019 15:50:40 +0000 (UTC) Received: by mail-qk1-f200.google.com with SMTP id x186so18157860qke.13 for ; Mon, 23 Sep 2019 08:50:40 -0700 (PDT) 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=Cj6Y1lnq7bXcC3kz0vWm87eC1U075TsPfURyzMigVaw=; b=H1osVVkZZkwVIM+AhMz7RU9wJwUcOMsHfP3dh3WhprmkoGV6Mohsoq1WEJrev03HUU aDgz7ZfhSAEttEHKLO3sEzx15AjoUpInsNln08i9IRM0316Xt4HcUG+93dBLsps/osks Gy6/qWVlJRAs8aGle2de2FiRJubChL3paDvmhMezYAOkIuXwofjMXODNJfrJkEJS737h Ak8mXS728sTdlDSms6fHUnkCVP6NUbzO5sl13w7DEdfWx/Kp/xySsD2KD8Cfs/k11PsB GQneO+dPicDwnf6st07es4GF43oNhKyDawaTRfYFI0NVzuw7Y/cwSwU7Zr9bYiP5FBKA 1WtQ== X-Gm-Message-State: APjAAAUb8TgU28OrfCsZOXYQPgnnY00w8ghjvyYkdgYzFJpJo+CcJcyV sqyH4C5FRsJNtnZqwDxtccBFbyakRyTbmoPmmJ5jMgoZJ/oCMDvkomK58uOT2Ex5dJBmG4ALGvv 6hy75S+eK6SU= X-Received: by 2002:a37:bc82:: with SMTP id m124mr466926qkf.231.1569253840054; Mon, 23 Sep 2019 08:50:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEKUtkTOCpbmKAVsuN5DEp8c5GEKKqBTQD9x7NMYUI+PUXnD6G5Fo6ixIl97M10Uj/81ScUg== X-Received: by 2002:a37:bc82:: with SMTP id m124mr466905qkf.231.1569253839907; Mon, 23 Sep 2019 08:50:39 -0700 (PDT) Received: from redhat.com (bzq-79-176-40-226.red.bezeqint.net. [79.176.40.226]) by smtp.gmail.com with ESMTPSA id g10sm5061349qki.41.2019.09.23.08.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 08:50:39 -0700 (PDT) Date: Mon, 23 Sep 2019 11:50:31 -0400 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: Alexander Duyck , 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 Subject: Re: [PATCH v10 3/6] mm: Introduce Reported pages Message-ID: <20190923114946-mutt-send-email-mst@kernel.org> 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> <49395e48-175f-8483-77f5-5fc3aca8b7cb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49395e48-175f-8483-77f5-5fc3aca8b7cb@redhat.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: On Mon, Sep 23, 2019 at 05:47:24PM +0200, David Hildenbrand wrote: > On 23.09.19 17:45, 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) > > > > To be even more precise: # CONFIG_PAGE_REPORTING is not set Even if it was, I'd hope for 0 overhead when not present runtime. -- MST