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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 6EE2FC433ED for ; Tue, 11 May 2021 14:06:31 +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 E1E356117A for ; Tue, 11 May 2021 14:06:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1E356117A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CE9D6E461; Tue, 11 May 2021 14:06:30 +0000 (UTC) Received: from pio-pvt-msa2.bahnhof.se (pio-pvt-msa2.bahnhof.se [79.136.2.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98C406EA47; Tue, 11 May 2021 14:06:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 740BA3F91F; Tue, 11 May 2021 16:06:26 +0200 (CEST) Authentication-Results: pio-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b="eWXuaS+X"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from pio-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n-93ihpsMnC1; Tue, 11 May 2021 16:06:21 +0200 (CEST) Received: by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id BCF803F6B9; Tue, 11 May 2021 16:06:20 +0200 (CEST) Received: from [192.168.0.209] (unknown [192.55.54.44]) by mail1.shipmail.org (Postfix) with ESMTPSA id 8503E360132; Tue, 11 May 2021 16:06:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1620741980; bh=7QkXcRCSZzcRG1O42g9xEHuy937rbA7zv1HOyuS7KVY=; h=Subject:To:References:From:Date:In-Reply-To:From; b=eWXuaS+XSGb3KMM6l0CuFaLQwZZky0LyAxBbG2LbL74yYDtw2PvkdRgLXP6bsMDb5 lj+5CHQX2R6d4jbZS0ZaNLwlhf4D5gndl/H6/hsmze4CTMBkDhNXN5CB+G0KfwlWz/ C/87IMO2lqO1Eu3BHjj7dgoTs2kOVq2ZYQU67SVw= Subject: Re: [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend To: =?UTF-8?Q?Christian_K=c3=b6nig?= , =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20210511132525.377190-1-thomas.hellstrom@linux.intel.com> <20210511132525.377190-7-thomas.hellstrom@linux.intel.com> <8ac6bc5c-17c0-2ffd-7f8c-823ab3c8a858@amd.com> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= Message-ID: <88ea8e22-3314-60a4-8f4b-0b37de444b1d@shipmail.org> Date: Tue, 11 May 2021 16:06:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <8ac6bc5c-17c0-2ffd-7f8c-823ab3c8a858@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 5/11/21 3:58 PM, Christian König wrote: > Am 11.05.21 um 15:25 schrieb Thomas Hellström: >> Most logical place to introduce TTM buffer objects is as an i915 >> gem object backend. We need to add some ops to account for added >> functionality like delayed delete and LRU list manipulation. >> >> Initially we support only LMEM and SYSTEM memory, but SYSTEM >> (which in this case means evicted LMEM objects) is not >> visible to i915 GEM yet. The plan is to move the i915 gem system region >> over to the TTM system memory type in upcoming patches. >> >> We set up GPU bindings directly both from LMEM and from the system >> region, >> as there is no need to use the legacy TTM_TT memory type. We reserve >> that for future porting of GGTT bindings to TTM. >> >> There are some changes to TTM to allow for purging system memory buffer >> objects and to refuse swapping of some objects: Unfortunately i915 gem >> still relies heavily on short-term object pinning, and we've chosen to >> keep short-term-pinned buffer objects on the TTM LRU lists for now, >> meaning that we need some sort of mechanism to tell TTM they are not >> swappable. A longer term goal is to get rid of the short-term pinning. > > Well just use the eviction_valuable interface for this. Yes, we do that for vram/lmem eviction, but we have nothing similar for system swapping. Do I understand you correctly that you want me to add a call to eviction_valuable() also for that instead of swap_possible()? > > In general please make separate patches for the TTM changes and for > the i915 changes using them for easier review. I'll respin with a split. Do you want me to do the same also for the other two patches that minmally touch TTM? Thanks, Thomas 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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 67DDCC433B4 for ; Tue, 11 May 2021 14:06:34 +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 C1EC761155 for ; Tue, 11 May 2021 14:06:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1EC761155 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A90DF6EA44; Tue, 11 May 2021 14:06:30 +0000 (UTC) Received: from pio-pvt-msa2.bahnhof.se (pio-pvt-msa2.bahnhof.se [79.136.2.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98C406EA47; Tue, 11 May 2021 14:06:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 740BA3F91F; Tue, 11 May 2021 16:06:26 +0200 (CEST) Authentication-Results: pio-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b="eWXuaS+X"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from pio-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n-93ihpsMnC1; Tue, 11 May 2021 16:06:21 +0200 (CEST) Received: by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id BCF803F6B9; Tue, 11 May 2021 16:06:20 +0200 (CEST) Received: from [192.168.0.209] (unknown [192.55.54.44]) by mail1.shipmail.org (Postfix) with ESMTPSA id 8503E360132; Tue, 11 May 2021 16:06:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1620741980; bh=7QkXcRCSZzcRG1O42g9xEHuy937rbA7zv1HOyuS7KVY=; h=Subject:To:References:From:Date:In-Reply-To:From; b=eWXuaS+XSGb3KMM6l0CuFaLQwZZky0LyAxBbG2LbL74yYDtw2PvkdRgLXP6bsMDb5 lj+5CHQX2R6d4jbZS0ZaNLwlhf4D5gndl/H6/hsmze4CTMBkDhNXN5CB+G0KfwlWz/ C/87IMO2lqO1Eu3BHjj7dgoTs2kOVq2ZYQU67SVw= To: =?UTF-8?Q?Christian_K=c3=b6nig?= , =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20210511132525.377190-1-thomas.hellstrom@linux.intel.com> <20210511132525.377190-7-thomas.hellstrom@linux.intel.com> <8ac6bc5c-17c0-2ffd-7f8c-823ab3c8a858@amd.com> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= Message-ID: <88ea8e22-3314-60a4-8f4b-0b37de444b1d@shipmail.org> Date: Tue, 11 May 2021 16:06:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <8ac6bc5c-17c0-2ffd-7f8c-823ab3c8a858@amd.com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Ck9uIDUvMTEvMjEgMzo1OCBQTSwgQ2hyaXN0aWFuIEvDtm5pZyB3cm90ZToKPiBBbSAxMS4wNS4y MSB1bSAxNToyNSBzY2hyaWViIFRob21hcyBIZWxsc3Ryw7ZtOgo+PiBNb3N0IGxvZ2ljYWwgcGxh Y2UgdG8gaW50cm9kdWNlIFRUTSBidWZmZXIgb2JqZWN0cyBpcyBhcyBhbiBpOTE1Cj4+IGdlbSBv YmplY3QgYmFja2VuZC4gV2UgbmVlZCB0byBhZGQgc29tZSBvcHMgdG8gYWNjb3VudCBmb3IgYWRk ZWQKPj4gZnVuY3Rpb25hbGl0eSBsaWtlIGRlbGF5ZWQgZGVsZXRlIGFuZCBMUlUgbGlzdCBtYW5p cHVsYXRpb24uCj4+Cj4+IEluaXRpYWxseSB3ZSBzdXBwb3J0IG9ubHkgTE1FTSBhbmQgU1lTVEVN IG1lbW9yeSwgYnV0IFNZU1RFTQo+PiAod2hpY2ggaW4gdGhpcyBjYXNlIG1lYW5zIGV2aWN0ZWQg TE1FTSBvYmplY3RzKSBpcyBub3QKPj4gdmlzaWJsZSB0byBpOTE1IEdFTSB5ZXQuIFRoZSBwbGFu IGlzIHRvIG1vdmUgdGhlIGk5MTUgZ2VtIHN5c3RlbSByZWdpb24KPj4gb3ZlciB0byB0aGUgVFRN IHN5c3RlbSBtZW1vcnkgdHlwZSBpbiB1cGNvbWluZyBwYXRjaGVzLgo+Pgo+PiBXZSBzZXQgdXAg R1BVIGJpbmRpbmdzIGRpcmVjdGx5IGJvdGggZnJvbSBMTUVNIGFuZCBmcm9tIHRoZSBzeXN0ZW0g Cj4+IHJlZ2lvbiwKPj4gYXMgdGhlcmUgaXMgbm8gbmVlZCB0byB1c2UgdGhlIGxlZ2FjeSBUVE1f VFQgbWVtb3J5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