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=-4.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 BB48FC433E1 for ; Sun, 23 Aug 2020 23:58:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5D1E5206C1 for ; Sun, 23 Aug 2020 23:58:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QotuNI+E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D1E5206C1 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 B5EBB6B0002; Sun, 23 Aug 2020 19:58:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B10006B0005; Sun, 23 Aug 2020 19:58:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FE676B0006; Sun, 23 Aug 2020 19:58:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 8A16A6B0002 for ; Sun, 23 Aug 2020 19:58:32 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3E4DB1EE6 for ; Sun, 23 Aug 2020 23:58:32 +0000 (UTC) X-FDA: 77183500464.12.copy87_5b0989f2704e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 139DF18008CAC for ; Sun, 23 Aug 2020 23:58:32 +0000 (UTC) X-HE-Tag: copy87_5b0989f2704e X-Filterd-Recvd-Size: 5957 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Sun, 23 Aug 2020 23:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598227110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3ae7r/HXyjg622rAZ8QfwTlQQk+yC0y1DlfCIxiu/nc=; b=QotuNI+EnyUYa908DHy4tAzEm4mNSHqUpzqTQKWxZ9NSA5TnyTXlfNXFySEIUlFl1Am05B vKJsyMhmpDGMNrMkQgd+HAm5cXBnWSlQyxZ9aBkbA/pDjDdM1ZzneHNLFaFWBdh0k7vtas 48V74fxsFT+kl20mGGh0Dr3dSUIcimE= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-466-6XN42IKiNKWgAhzvrHSjLw-1; Sun, 23 Aug 2020 19:58:28 -0400 X-MC-Unique: 6XN42IKiNKWgAhzvrHSjLw-1 Received: by mail-qv1-f70.google.com with SMTP id d19so5186533qvm.23 for ; Sun, 23 Aug 2020 16:58:28 -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=3ae7r/HXyjg622rAZ8QfwTlQQk+yC0y1DlfCIxiu/nc=; b=m0RshY20cFNYR/y/jW/XnMsnCh1noQy9eRQCd0EcxG+/sRE2fNk2/fvmdWG6SXFxm3 w1vIfy7SHBX6rDVEhHescd/AgEJjtgScAJIP4RXDKSz9uT4R9IUmxH833Q1tP6+ZBdcH bwvfDHGZMtFCwB0ERcV9u8DuBSw709zZwtrnHrV4xNWz7R3lzujJGes+7lV0y3VxE9ka a5ocN/mu1ptOxz7CTcpbgk6njNPbHS7gUL2y2kX+Mfm2oyIEHUV6nS32mXYrgMLK9nDH GJHn6uNIaDsI50hEET6Et1Mu5g/xpdcLyo+dOWAN50+EOKYw+U/cOUvbS3cDgmQg60ra edBA== X-Gm-Message-State: AOAM5319CRkynVYsE1GPRPgucFYRTxMYq3SwdeCu3i27EE5YhHNrEeAL q0gT1qWXJR+SuieM+IHbDmRqwTu3IFZ9uavjQq7LI3lAselolvtp+68OzMt1T52myGGMnGhK6KG pz0YlKihOcGg= X-Received: by 2002:a05:620a:11a6:: with SMTP id c6mr2555978qkk.209.1598227107694; Sun, 23 Aug 2020 16:58:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw56gNsSLcW71PTv1UE4TN1PQs6Y3F6UAPGREEyJaQjLJOideQJYeYOzUdjGc3RVUm6T2EP7w== X-Received: by 2002:a05:620a:11a6:: with SMTP id c6mr2555961qkk.209.1598227107416; Sun, 23 Aug 2020 16:58:27 -0700 (PDT) Received: from xz-x1 (bras-vprn-toroon474qw-lp130-11-70-53-122-15.dsl.bell.ca. [70.53.122.15]) by smtp.gmail.com with ESMTPSA id g4sm8116313qka.25.2020.08.23.16.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2020 16:58:26 -0700 (PDT) Date: Sun, 23 Aug 2020 19:58:24 -0400 From: Peter Xu To: Linus Torvalds Cc: Linux-MM , Linux Kernel Mailing List , "Maya B . Gokhale" , Yang Shi , Marty Mcfadden , Kirill Shutemov , Oleg Nesterov , Jann Horn , Jan Kara , Kirill Tkhai , Andrea Arcangeli , Christoph Hellwig , Andrew Morton Subject: Re: [PATCH 0/4] mm: Simplfy cow handling Message-ID: <20200823235824.GA6231@xz-x1> References: <20200821234958.7896-1-peterx@redhat.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: 139DF18008CAC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Sat, Aug 22, 2020 at 09:05:37AM -0700, Linus Torvalds wrote: > On Fri, Aug 21, 2020 at 4:50 PM Peter Xu wrote: > > > > - Run a busy loop dirty program [1] that uses 6G of memory, restrict to 1G > > RAM + 5G swap (cgroup). A few hours later, all things still look good. > > Make sure to observe (still massive) correct page reuses using the new > > counter using the last patch, probably when swapping in. > > > > - Run umapsort [2] to make sure uffd-wp will work again after applying this > > series upon master 5.9-rc1 (5.9-rc1 is broken). > > I obviously like the diffstat, am wondering if you saw any throughput > changes or similar for the busy-loop dirtying thing? I didn't compare the two in my previous testing. Firstly, although my program did output some dirty rate information in per second basis, the dirty rate is kind of fluctuating during the runs due to frequent swap in/out pages, and I cannot observe a stable dirty rate at least with the patch applied. I'm afraid I'll see similar thing even without applying the patch. Maybe it'll show some statistic pattern if I do it per 10sec or longer, but not sure. More importantly, I'm not sure whether that's the major case to compare either if we want to have some rough understanding about patch 1 on the performance impact. The thing is, my test program only dirtied some private allocated pages with itself as the only owner of the pages. IIUC the page reuse logic will trigger on either the old or new code because both the mapcount or refcount will be one. If we really want to compare the two, shouldn't we run some tests that will trigger the COW differently before/after the patch? E.g., when some pages are referenced by some GUP users and when COW happens with only one pte mapped to the page. I haven't thought deeper than this on such a test yet. So my previous testing was majorly for making sure the general cow and the swap path will at least still behave as expected. Thanks, -- Peter Xu