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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 ECC6DC4320E for ; Mon, 16 Aug 2021 07:13:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ADED61A8C for ; Mon, 16 Aug 2021 07:13:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9ADED61A8C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B1F589C08; Mon, 16 Aug 2021 07:13:02 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2047389CA2; Sun, 15 Aug 2021 15:38:28 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 38F4867357; Sun, 15 Aug 2021 17:38:26 +0200 (CEST) Date: Sun, 15 Aug 2021 17:38:25 +0200 From: Christoph Hellwig To: Alex Sierra Cc: akpm@linux-foundation.org, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jgg@nvidia.com, jglisse@redhat.com Subject: Re: [PATCH v6 05/13] drm/amdkfd: generic type as sys mem on migration to ram Message-ID: <20210815153825.GB32384@lst.de> References: <20210813063150.2938-1-alex.sierra@amd.com> <20210813063150.2938-6-alex.sierra@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210813063150.2938-6-alex.sierra@amd.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Mailman-Approved-At: Mon, 16 Aug 2021 07:13:01 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Fri, Aug 13, 2021 at 01:31:42AM -0500, Alex Sierra wrote: > migrate.vma = vma; > migrate.start = start; > migrate.end = end; > - migrate.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE; > migrate.pgmap_owner = SVM_ADEV_PGMAP_OWNER(adev); > > + if (adev->gmc.xgmi.connected_to_cpu) > + migrate.flags = MIGRATE_VMA_SELECT_SYSTEM; > + else > + migrate.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE; It's been a while since I touched this migrate code, but doesn't this mean that if the range already contains system memory the migration now won't do anything? for the connected_to_cpu case?