Message ID | 20230712114605.519432-4-tvrtko.ursulin@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1106280vqm; Wed, 12 Jul 2023 05:17:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZlJEdHjz3F9/Rb70ZkxZfPJkfV+cV/afSk4KbIXA7eKwBrm9vwQFQlvowdRPwSLjUOSIF X-Received: by 2002:aa7:c0d0:0:b0:51e:421e:d209 with SMTP id j16-20020aa7c0d0000000b0051e421ed209mr2289652edp.13.1689164229482; Wed, 12 Jul 2023 05:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689164229; cv=none; d=google.com; s=arc-20160816; b=oXsZiOzRTlff0PV1jRZsyLwnRMH0417NIsiP1+GAeon2rNZjXSP/lyyAMKxWva1fO2 1JJ9s7QxbjvBS1ETole4wBrPn/xCtr41DTzno+kyi5mS/sZ6Ctt+dyOmr415Cb64E2Vn QtEHs0+50bTkdPIZVN7TDZBqmi6IKnBl9600s1rnHF0gx6a6ao9U4F/S2EjucsQ8ED40 Eny6GKSOxZYyxAnbkSL89DAlXAlj7YNqBC3ZlqDKXAXU8eg7tO6YUdFOiAkZ6j+ta4mD q3Ov0xTf02haQ1PdPceXT7XOHfXAaa3giM7/AGKk04m9hV53der5s8c2YrPdn1IDcYXE aVBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QBFOyXw9f2q7gMcGy8V2TmJQ9/sXiGDfe3C13IUrr8s=; fh=UsT/IYsmrHK8Tj61E3lO7dmEfkPySLWlJpEUULEmP7s=; b=ke5s3FUcqx+t9Y1e0Ppaqn9D3rFbqG+/PXo7JCW/RDkN++LkJRG/abAcTv1RWQAvuU EPkE5hKYNY7oIKbbaE+ZbSnTP9dldhkIrHKZ/NUo0kRdrK8xyRs6cUyoSohdGc3HzdVu CbYrqrnAXpzXGFJZCof/ECkQYcIOOxT6FgMw5H6mRujlUyMKXx6J6KINCJ34ZFgDFsIA 1IllDbLOIntZEw2ZdlfIzFb4ER8NB/gMPm9+L6fAcC93b673wC9TQgci/vBVIrhlfF+E meJQlW75NNNWIcj+GU7PcLz/5icDy6ZSHSfDJjh+BVghiYcvDGMZmdxG/mZE1V08YHta n6jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GaexiT5K; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020aa7ce0f000000b0051d9db1a578si4459527edv.671.2023.07.12.05.16.45; Wed, 12 Jul 2023 05:17:09 -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=GaexiT5K; 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 S233339AbjGLLtQ (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Wed, 12 Jul 2023 07:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233341AbjGLLsb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 07:48:31 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CE121BCF; Wed, 12 Jul 2023 04:48: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=1689162485; x=1720698485; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=75FdISXFIBIdArdQdqTeYKagFkSfhuce1VMLySmuSgc=; b=GaexiT5K53vjhvp4AxIMftCnCf1nQVSmCRxnn5us5VsJvrj0rSr/ZsXZ aAj1ocWxtyKCWAo4D9lv8IIrbzT9QoPD1CyHUZVrEBVQ0Qf/jSCJpIhVZ IKuOKr9+fEVOnqEEaqzq3FBepgakDhV7GgdOUeI5arUqifD9D6/RC9Z8v k5UWNZuqli0H5hsK1OW1QUOwmyM4eQOHmM6XWHeOFIOR16WFUQpbRcaAt BqHmbCPEATLZZADwZLVaSrzAwqTPLvLqQHTVTVN8jxogxaPDI3mg1Drbk wWPkT/ZRPrDNUmUktfd/0inMYQmDPZcKLvXrMZR4wD3RsSn/kvgqYFgqK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="344469096" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="344469096" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 04:46:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="866094042" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="866094042" Received: from eamonnob-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.213.237.202]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 04:46:24 -0700 From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>, Zefan Li <lizefan.x@bytedance.com>, Dave Airlie <airlied@redhat.com>, Daniel Vetter <daniel.vetter@ffwll.ch>, Rob Clark <robdclark@chromium.org>, =?utf-8?q?St=C3=A9phane_Marchesin?= <marcheu@chromium.org>, "T . J . Mercier" <tjmercier@google.com>, Kenny.Ho@amd.com, =?utf-8?q?Chris?= =?utf-8?q?tian_K=C3=B6nig?= <christian.koenig@amd.com>, Brian Welty <brian.welty@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@intel.com>, Aravind Iddamsetty <aravind.iddamsetty@intel.com> Subject: [PATCH 03/17] drm/i915: Track page table backing store usage Date: Wed, 12 Jul 2023 12:45:51 +0100 Message-Id: <20230712114605.519432-4-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230712114605.519432-1-tvrtko.ursulin@linux.intel.com> References: <20230712114605.519432-1-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771217070868797702 X-GMAIL-MSGID: 1771217070868797702 |
Series |
DRM cgroup controller with scheduling control and memory stats
|
|
Commit Message
Tvrtko Ursulin
July 12, 2023, 11:45 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com> --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c index 731d9f2bbc56..065099362a98 100644 --- a/drivers/gpu/drm/i915/gt/intel_gtt.c +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c @@ -58,6 +58,9 @@ struct drm_i915_gem_object *alloc_pt_lmem(struct i915_address_space *vm, int sz) if (!IS_ERR(obj)) { obj->base.resv = i915_vm_resv_get(vm); obj->shares_resv_from = vm; + + if (vm->fpriv) + i915_drm_client_add_object(vm->fpriv->client, obj); } return obj; @@ -79,6 +82,9 @@ struct drm_i915_gem_object *alloc_pt_dma(struct i915_address_space *vm, int sz) if (!IS_ERR(obj)) { obj->base.resv = i915_vm_resv_get(vm); obj->shares_resv_from = vm; + + if (vm->fpriv) + i915_drm_client_add_object(vm->fpriv->client, obj); } return obj;