Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1081649ybt; Wed, 1 Jul 2020 18:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR8gmReIQN5LfDN1C/OoaBB9W8dwmjiweQq3aaI5QZEs3Zx1r5S+GYWePomRkMUGgX0GRB X-Received: by 2002:aa7:d142:: with SMTP id r2mr25065196edo.211.1593652993549; Wed, 01 Jul 2020 18:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593652993; cv=none; d=google.com; s=arc-20160816; b=ug90ZQer1JwswAiah0F1LvrdmxSdgzA/CZpvH9Qqa15KqRHidwRTZmLgOinqGW3quj ApX92lMN2c3mpPGhq87a7cTt79tDAbmC4sjeSdlWG1ejnEi3qoTqZAQjt4H3bHueS9A2 jDriUb3DTCsQCVjjXgOFyYn85R+S9E8ysrL5PKfx6H4ahyp+D34mv9NGpx7c0b9Gi7I4 ps0XO/1VMZaLVb3BLoTu0AV9TcNmPFYDt09fbjVQGNeabnDexIV1IWxxkCket24Ym7Vg 9VkrHvrOiS48/a92s3/2iAc+iP5GPICTzYfA79Of9PDTv9lrOq79fmEuEp6IIwVjDVGj u/Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=QEGv50PLo58YhV+ISjusFgSvyncneOO57LSE9uudKn0=; b=DJbHHrh+iUP3tOiaGMhek0vbOfqW2SIwwU3wioZ+s57kjSE6PIk2e0ktRsjlYA66K8 inJMauE5r9XDVFc49jdos3oHH0f8yPidCGbPzuRRRWijsAj28Dl7+q6RfsqvGKWMdw08 2SHef43f6FFRA7QJy80H3sAw19MWTqhGZ/8+cX+vK/ZdanlBQr6MqUoN33a61JLorJM5 jxO8iwIQDIki38TwZSJeJjNLMgIMfu6XMReJ8MkL7TOdzOlhP89rLJ3WF68QvNpWR766 cMPDVP1DxOboGKKv6KODAFkTEMJ8zidjjbv+MdkP6F7PzuiKWqaXi4nleod8/a9XbVx+ CcxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si4916036ejr.470.2020.07.01.18.22.50; Wed, 01 Jul 2020 18:23:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbgGBBUH (ORCPT + 99 others); Wed, 1 Jul 2020 21:20:07 -0400 Received: from mga01.intel.com ([192.55.52.88]:39459 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbgGBBUH (ORCPT ); Wed, 1 Jul 2020 21:20:07 -0400 IronPort-SDR: uro9CT9Wri9AumaEJn6/eEvXJsUuZyt2G09UAIaxwAdwRdTPt4/gkc9fBR5RoHdWGKe8+p5xPE JtfRaR7b0SaQ== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="164805700" X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="164805700" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 18:20:04 -0700 IronPort-SDR: KIuacI0QVpJAbNqRCLESWM38cXlYvzAIPduUiJXxQQZ1OSkAQzJYjiihINh1UvLfUc+yhZLcjE SCGaC6dCVk1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="281785832" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.23]) by orsmga006.jf.intel.com with ESMTP; 01 Jul 2020 18:20:01 -0700 From: "Huang\, Ying" To: Dave Hansen Cc: Dave Hansen , , , , , Subject: Re: [RFC][PATCH 5/8] mm/numa: automatically generate node migration order References: <20200629234503.749E5340@viggo.jf.intel.com> <20200629234512.F34EDC44@viggo.jf.intel.com> <87ftadotd5.fsf@yhuang-dev.intel.com> <3ef8a701-fe8a-cf65-5b72-806b244aae8b@intel.com> Date: Thu, 02 Jul 2020 09:20:00 +0800 In-Reply-To: <3ef8a701-fe8a-cf65-5b72-806b244aae8b@intel.com> (Dave Hansen's message of "Wed, 1 Jul 2020 11:23:00 -0700") Message-ID: <878sg2lnlr.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave Hansen writes: > On 6/30/20 1:22 AM, Huang, Ying wrote: >>> + /* >>> + * To avoid cycles in the migration "graph", ensure >>> + * that migration sources are not future targets by >>> + * setting them in 'used_targets'. >>> + * >>> + * But, do this only once per pass so that multiple >>> + * source nodes can share a target node. >> establish_migrate_target() calls find_next_best_node(), which will set >> target_node in used_targets. So it seems that the nodes_or() below is >> only necessary to initialize used_targets, and multiple source nodes >> cannot share one target node in current implementation. > > Yes, that is true. My focus on this implementation was simplicity and > sanity for common configurations. I can certainly imagine scenarios > where this is suboptimal. > > I'm totally open to other ways of doing this. OK. So when we really need to share one target node for multiple source nodes, we can add a parameter to find_next_best_node() to specify whether set target_node in used_targets. Best Regards, Huang, Ying