Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1744456pxb; Wed, 30 Mar 2022 09:18:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYNcvld1FqlS38DDBkG84/mND7xCeL/rTuXVFNLBARZhTXxkrBrEFuyRD9PpHlCjPfe3b6 X-Received: by 2002:a17:907:3f18:b0:6e0:df2d:c76a with SMTP id hq24-20020a1709073f1800b006e0df2dc76amr296881ejc.55.1648657083751; Wed, 30 Mar 2022 09:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648657083; cv=none; d=google.com; s=arc-20160816; b=Zwg1PQERcSPoZPIg1+5bQUcvw9jBK63AqYndZjHeSEVivietBQWjARIgrng2B6fi3F X0wXKdW30kEaSx+Y5dOcpCe6qNgqISrIHp8HRGIBMc9gePy/bkM74xnosg37sGH4EYVb 5fHnFNPaJvfLDfhx43YxpuH/SU3+PoR3I2kdmItoECXb7GynXOeCkS9bsBXXoTSDVR7g Z5mLkkmdb9LrkMUhcZHJqo4RjgOsOK2LInKZB6rGsMEYu56Br57mdd+5qbHPsobo0tPF UxtuOfkUjwkViL9QCKbI+/NL6Xql8ZCgvSYjiDr7lmlJMYe5b/bNf5yn8IZLo2s5tgtG sTfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=zSNkHSWlhDmOFxIshgIvXRDSTmtMTSa2VT5OS4/5rxE=; b=kL0yHKX7qgMFGIo6jUwiPA2SF6B4loHX8AZkemLddnzwp47xEjkp6kJKWG8/kZuYGO uyrrzDRWVRKQbR98JKxX17qecQpdVfEiTDJ89YOc4U2OXLmnaHBqfnAwB/qdaovs0BEY X2yTCt1S2UbV7u1VSlV+MruqHWsMWC2nrgvaCxsbSsEOv/ctt0xmOkM0nWes3K2kdS74 WoUXfnQQUZvR4vXMEChgmk1mL6i6fm3V4JANNZhoBByj7HrmL179BafVmXtlPCTP39AH vH7w4SUPVlZIHBCcHVcJzzFFNjCCB+3pWgSIBSv/6PXiyBhH7y3snmveS9XiKBFO2hZF ihNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KW6PN9cx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t26-20020aa7db1a000000b00418c2b5bf6dsi20396947eds.591.2022.03.30.09.17.35; Wed, 30 Mar 2022 09:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KW6PN9cx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237738AbiC2Wlz (ORCPT + 99 others); Tue, 29 Mar 2022 18:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238115AbiC2Wly (ORCPT ); Tue, 29 Mar 2022 18:41:54 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95372325CE for ; Tue, 29 Mar 2022 15:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648593605; x=1680129605; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=9ZxjrWRQCn+QQnHcEkTsysVidpslLyjF9+Y3Xn6wT/0=; b=KW6PN9cx8i/VARrW8clBKUM+rWmNUxyAbA8VZbqyPy1rxGLhKKQkjm1t 3vSQRYuIYFipPla/W8lDVEIVdY3NIPOX5wbO8pgRS2dvkSO10LnsQUNRf SNfxXQAxxCmLBPqwi5b+gHSmYPXX/Ega1bUmO0PiiPTLumb5bkVybxyf0 0mFe5F3ohThha0hBbwvrdT5Z0i683iLe20AyWdT9UIMnD+hEnBCdsXRJG 2AjtZbaHrvUSi2X/sFjtzgR7dDxZRuAgYkgmBeE73+M6i3bnxLLsntvpt FPCT4ga1c0d8LZrJacx+1WwCoQMH5Zu5442RWkG2aX3lY5Bfr668vZxgp w==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="256969867" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="256969867" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 15:40:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="605075895" Received: from acstuden-mobl.amr.corp.intel.com (HELO [10.209.45.17]) ([10.209.45.17]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 15:40:04 -0700 Message-ID: <3842f49f-d940-333b-74ad-55d1521209cb@intel.com> Date: Tue, 29 Mar 2022 15:40:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Jagdish Gediya Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, baolin.wang@linux.alibaba.com, dave.hansen@linux.intel.com, ying.huang@intel.com References: <20220329115222.8923-1-jvgediya@linux.ibm.com> <55161160-1084-c81d-d116-00f5bcaa1268@intel.com> From: Dave Hansen Subject: Re: [PATCH] mm: migrate: set demotion targets differently In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/29/22 09:46, Jagdish Gediya wrote: >> I'd love to see some more information about *why* the current code >> doesn't work. Is it purely a bug or was it mis-designed? > I think the design seems to be intended because as per the comment > in the current code, it was known that there are limits to the node > sharing as a demotion target. Ahh, that makes sense. You've got some slow memory that's not really associated closely enough with an initiator node to be used exclusively for demotions from that node. The original code was really intended for demotions when the system is made up of relatively identical building blocks, like one CPU with two kinds of memory attached. I think what you're doing here makes sense. The only thing I'll say is that, at some point, we need to stop messing with the demotion order that the kernel comes up with. It's not going to be able to handle *everything* perfectly. We're probably not at the point that we should stop enhancing the kernel-generated demotion order, but let's at least keep in mind that we should stop eventually.