Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp316540pxm; Wed, 2 Mar 2022 16:12:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbM+WwLzAbcQaiuduWvD5rNoEHx5sc9BskYvjAmsr3wNp+JT5tM7kGyHvfrf95KQbEWaOO X-Received: by 2002:a17:902:a9c3:b0:14d:c5cc:d26c with SMTP id b3-20020a170902a9c300b0014dc5ccd26cmr33315613plr.18.1646266358541; Wed, 02 Mar 2022 16:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646266358; cv=none; d=google.com; s=arc-20160816; b=CxEaHHEzx5QV/QfcoAyampdO0Pe7dpi/v5+9xu8svbpr80jGCj1OZdrwaea9u31EZe ymS9ziiSQB4s1fAV/bPaiqTvfK+3136Y3iBDUyf1lyH8IrnFc5jpwtADgC9cyiVcU4Te gNJFsOe8cT3CYhUMTzTjOn1etdfFz3GY7vbgutD+qGeftYyLo6ZhIvQX2FEgoqN0jQMA E03t3GImgAYsb/l4ivcgLaK4GVvrTXsUjWZRqAPge1/mHhFwJvj/Zh500xWUVfhWD12R +a8WKirc801Jzlzmc9kOYx2771aONHUSMJ3aZ9QZOeU/vkFMNUSgfXVBUjuaBbeEpayF zg8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Kxdri9q+ImUk+tYNnXVNgw+CIHacKN0zItHgqZfNyWQ=; b=w0RWppS6qgXB2T0qxwPrURxC78O3nVxTXZXe8KJsrsCsrc37WAXvOfMzpJYB7W/tyN MXmHwr4imzjNmM/SmC0y6feVNb2lXa9i32jweFd7xPcSCaLViesXjOziTWAQuY1xuMdr VER1g9ANYJDP+z9WQPUYHApOMSraJh7gaxKUl4s5L8+z1Zdy4h83n4pL2T9JQxNHEUHv t+SvKzmatTtSpNvphl8eIleRVQYup6XQIdGOzLfOpcR/tsE4Tz+uAGBP2ePxCgVbBq6h Pup3Qc6NGk9rDgHBpL4c2cG603wz42NHIsxUpqE4xSQ4rkHlUZ84D0X8Z0sV03jVR+Uk ezwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g4-20020a170902868400b0014fa4ceef76si483541plo.114.2022.03.02.16.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:12:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C2A11C885F; Wed, 2 Mar 2022 15:27:51 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242893AbiCBO0G (ORCPT + 99 others); Wed, 2 Mar 2022 09:26:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242888AbiCBO0E (ORCPT ); Wed, 2 Mar 2022 09:26:04 -0500 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A214C55B7; Wed, 2 Mar 2022 06:25:21 -0800 (PST) Received: by mail-wr1-f47.google.com with SMTP id d3so3093425wrf.1; Wed, 02 Mar 2022 06:25:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Kxdri9q+ImUk+tYNnXVNgw+CIHacKN0zItHgqZfNyWQ=; b=WYCqEibNCcrwhlb7IXnHxkjm2d87gdLVFMhZdPmycQwLmhrt4wCnDIH+TUas4yjfME 3VyjyPY7Jjs6l7rB0puB4vGm4drhAlMxMnz2ltKvsiWHD6AwihIGBS6g0g4BQxaFQuWK H8WjWRlsMCL3MKl6rgz2rWVG9ZVFhz4ssOb+jUfGCffaEZjxSYPyurpJaemhOeYHiory IN6fRJAtmq7e6BTFwouL6bCGQV7VuqI+7DDMAK3b+HX2wPTjzvl1a1hH3Sp/B4QmnGk3 Oq7luqWwwo3KdHVCeMGLpIqCqjWBFX5I1gFhyMHdD8lRP8sH3WOAVE7mlfmoQoz25vQI QEEA== X-Gm-Message-State: AOAM533lc57vrsvgSjimETx2lizmUoeA9Tn/ndlCyKpz/MNR8i9ThvfW RhvmqL8RXI20uHRF/L2iEug= X-Received: by 2002:adf:e804:0:b0:1ea:9c3b:8f41 with SMTP id o4-20020adfe804000000b001ea9c3b8f41mr23755756wrm.53.1646231119675; Wed, 02 Mar 2022 06:25:19 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id r12-20020a05600c2c4c00b003816932de9csm5839440wmg.24.2022.03.02.06.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 06:25:19 -0800 (PST) Date: Wed, 2 Mar 2022 14:25:17 +0000 From: Wei Liu To: Iouri Tarassov Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, spronovo@microsoft.com, spronovo@linux.microsoft.com, gregkh@linuxfoundation.org Subject: Re: [PATCH v3 26/30] drivers: hv: dxgkrnl: Offer and reclaim allocations Message-ID: <20220302142517.kgc5o7ufj2yf4cif@liuwe-devbox-debian-v2> References: <719fe06b7cbe9ac12fa4a729e810e3383ab421c1.1646163378.git.iourit@linux.microsoft.com> <3a6779567438b02566012679f01ebb065e3761db.1646163379.git.iourit@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a6779567438b02566012679f01ebb065e3761db.1646163379.git.iourit@linux.microsoft.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, Mar 01, 2022 at 11:46:13AM -0800, Iouri Tarassov wrote: > Implement ioctls to offer and reclaim compute device allocations: > - LX_DXOFFERALLOCATIONS, > - LX_DXRECLAIMALLOCATIONS2 > > When a user mode driver (UMD) does not need to access an allocation, What is a "user mode driver" in this context? Is that something that runs inside the guest? > it can "offer" it by issuing the LX_DXOFFERALLOCATIONS ioctl. This > means that the allocation is not in use and its local device memory > could be evicted. The freed space could be given to another allocation. > When the allocation is again needed, the UMD can attempt to"reclaim" > the allocation by issuing the LX_DXRECLAIMALLOCATIONS2 ioctl. If the > allocation is still not evicted, the reclaim operation succeeds and no > other action is required. If the reclaim operation fails, the caller > must restore the content of the allocation before it can be used by > the device. > > Signed-off-by: Iouri Tarassov