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=-1.0 required=3.0 tests=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 C7150C433E1 for ; Wed, 17 Jun 2020 06:48:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6BD0A2098B for ; Wed, 17 Jun 2020 06:48:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BD0A2098B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8D0C06B0008; Wed, 17 Jun 2020 02:48:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 880CB6B000D; Wed, 17 Jun 2020 02:48:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 749536B000E; Wed, 17 Jun 2020 02:48:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id 58D056B0008 for ; Wed, 17 Jun 2020 02:48:31 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F3795180AD807 for ; Wed, 17 Jun 2020 06:48:30 +0000 (UTC) X-FDA: 76937775180.09.jar46_0e03d1126e05 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id D8215180AD804 for ; Wed, 17 Jun 2020 06:48:30 +0000 (UTC) X-HE-Tag: jar46_0e03d1126e05 X-Filterd-Recvd-Size: 4395 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Jun 2020 06:48:30 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id s28so1021118edw.11 for ; Tue, 16 Jun 2020 23:48:30 -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=OJ3s/HlOTbYQFOq7uleghPGGvHCAXsQqGed7hYcH7AA=; b=NUHK5CfQI/Q9j3sBnwDuFPC4IGU1FGW0nSszUW36D88IXLtEisegbwfYH21TgfkZ9C yMrpeyRX5SVtOdrjCOsHvMslgL++tTGV3/myAKdfrM6X/LAL5czVQZ4If1FZohavr4YA NmAJrt0xkKHEV+scEHU2vDJ1xbK351G1NAeKIh6uyui7ekX6+OPbNM08e0nv0EbTZlM8 /jLoCx14tiyVb1AXTY8G8ueGyH6y1N8FHWoHHz71quNmW3Wgpwck3mUrB6877SlDwOpH Fc8BFIdJY4pDA/YxUw8ExfnBbwAEXIDcLvDy6ZpACy0lz/iL/I/cptDs1IflW+l+4mHx H0hw== X-Gm-Message-State: AOAM532PW2Si4NS2fJvNWT4f8rV3MDMbCVSOB8obpo9IMIOruGHZWSSr xnWEbniVHUIts0fht/ccvRY= X-Google-Smtp-Source: ABdhPJz3JWyhEs5CJzo9aqGn8eQwPEdhBSBq1iQhuPOQVrf11C3H2KT08oegvw3aW84ZOPEucDEVRg== X-Received: by 2002:a05:6402:b31:: with SMTP id bo17mr6113230edb.152.1592376509342; Tue, 16 Jun 2020 23:48:29 -0700 (PDT) Received: from localhost (ip-37-188-158-19.eurotel.cz. [37.188.158.19]) by smtp.gmail.com with ESMTPSA id a7sm11381186edx.3.2020.06.16.23.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 23:48:27 -0700 (PDT) Date: Wed, 17 Jun 2020 08:48:26 +0200 From: Michal Hocko To: Dan Williams Cc: David Hildenbrand , Linux Kernel Mailing List , Linux MM , Andrew Morton , Alexander Duyck , Dave Hansen , Kees Cook , Mel Gorman Subject: Re: [PATCH v1 2/3] mm/memory_hotplug: don't shuffle complete zone when onlining memory Message-ID: <20200617064826.GI9499@dhcp22.suse.cz> References: <20200616115213.13109-1-david@redhat.com> <20200616115213.13109-3-david@redhat.com> <20200616125051.GH9499@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: D8215180AD804 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Tue 16-06-20 10:03:31, Dan Williams wrote: > On Tue, Jun 16, 2020 at 10:00 AM Dan Williams wrote: > > > > On Tue, Jun 16, 2020 at 5:51 AM Michal Hocko wrote: > > > > > > On Tue 16-06-20 13:52:12, David Hildenbrand wrote: > > > > Commit e900a918b098 ("mm: shuffle initial free memory to improve > > > > memory-side-cache utilization") introduced shuffling of free pages > > > > during system boot and whenever we online memory blocks. > > > > > > > > However, whenever we online memory blocks, all pages that will be > > > > exposed to the buddy end up getting freed via __free_one_page(). In the > > > > general case, we free these pages in MAX_ORDER - 1 chunks, which > > > > corresponds to the shuffle order. > > > > > > > > Inside __free_one_page(), we will already shuffle the newly onlined pages > > > > using "to_tail = shuffle_pick_tail();". Drop explicit zone shuffling on > > > > memory hotplug. > > This was already explained in the initial patch submission. The > shuffle_pick_tail() shuffling at run time is only sufficient for > maintaining the shuffle. It's not sufficient for effectively > randomizing the free list. Yes, the "randomness" of the added memory will be lower. But is this observable for hotplug scenarios? Is memory hotplug for the normal memory really a thing in setups which use RAM as a cache? While I do agree that the code wise the shuffling per online operation doesn't really have any overhead really but it would be really great to know whether it matters at all. -- Michal Hocko SUSE Labs