Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp164995iog; Fri, 24 Jun 2022 01:19:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t3x+6y4PHvXjlKNUk+1lUiLxi/XSNmyrHcOwYeOnirQyn7xVGEvTx1eRQ+lj/ntqG51FZw X-Received: by 2002:a63:3fce:0:b0:40c:23a5:2827 with SMTP id m197-20020a633fce000000b0040c23a52827mr10925775pga.314.1656058752435; Fri, 24 Jun 2022 01:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656058752; cv=none; d=google.com; s=arc-20160816; b=MXYSlqp+wfkFNcUt/lSM6BWwgV3rsKuOI39KrZ+OrZ5fYTw/N6FY52r0OWbj440FyV EB1e71GLm+KOUoHIvppsOLNXG1m0sW9a8pyye+MRPZyREZH4HVFJ0eVw4rp0BRrHN6Ib awS2aug6Am9WTOLXp6dv/gd7buVvsLXepiLiaTaIS3J4MAhsZ8uQ9OzaAr/GV3uHoEo9 en36k5nHJTNS6tGwqGDfbNIBTwVn2ma2dnCXCpEx9Bb/N51BDJsyeUJDLsh4mHwFuS/f QpCDzXsqDDet5cbwQHbUi4QjAUOy670FvTlSCqCHjOtyVfEf+K+ly9egWP69YwOrbznc su5w== 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=CVQLS1Q8p0L2oqy2feCuipYYw0Dn51iYeixzeYC0qk0=; b=g5sOarCFEhbBiD/XA8af+zynHGSovXRAHy81vHhPTuA7Qn+Ls0zoOCLN50+IK+YDfP fLqMyOEmJe0XvxsuZn3WQ3VvFlUaYtgbo4ZwotbcHoBVNSXiKj2DVmCqqf8GmowmwJ3m E2PpN4h4aEv+p2uFfwGbcbktqwyztTbD4vgG5/0Raus7AMCJKS9EJcjaa9MVD0N8LcM3 ptzS+t4bjuRRCeAZJNHk+RZpcT30T6oLnHVYy/f4/D+l/nF5ickkR5Fr/m4s6scrlkCB BBgdpHRogfHHf7q1zdlb1jJrmZJFh/E4Dt7hrEVdhUnIFBXLrGf/uivB2veiQSN9LepD 166A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=diumkHDM; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d65-20020a633644000000b0040d3073018fsi1903927pga.391.2022.06.24.01.19.01; Fri, 24 Jun 2022 01:19:12 -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=@gmail.com header.s=20210112 header.b=diumkHDM; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231238AbiFXIFp (ORCPT + 99 others); Fri, 24 Jun 2022 04:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbiFXIFB (ORCPT ); Fri, 24 Jun 2022 04:05:01 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40B06DB28; Fri, 24 Jun 2022 01:04:57 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id eq6so2313776edb.6; Fri, 24 Jun 2022 01:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CVQLS1Q8p0L2oqy2feCuipYYw0Dn51iYeixzeYC0qk0=; b=diumkHDMGen9Vt3PpkuAbvqzWKQd+Xdn973nNKdfdCDDC0zTX2C6hvIxsHe2V7Hoc4 IOhBR2vnm8dxvhsKFIBXPaolCk/OFXCBQ1WZCwL71kg8/Qq8WUQziQwUP00AOcwUcOGP rXTcnuW7puIRMcesyziDQyu7bT1G2aJvnhdPeFeaq+EwQpiHIGMo14FD4eE8URrxEDxV 0m2ZDeucEfDeKkG17Nd8V6yPSz995Flq0dRdec0ubvhe6xb2D8xZHUXfzD0udY0tRU0C HcnFjUnQwXhFVgFVmkiIUcsMCluaFxgfHNgP1bHGOZQJ0mTg8yzEf2GVutNriYht8F60 tNsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CVQLS1Q8p0L2oqy2feCuipYYw0Dn51iYeixzeYC0qk0=; b=ku7kr8A/OMxxUJeWx/wLEJs9GrdDqw52ECkUkIsDmSIwD/biSwtzFQ2unXmBVtBZ+T 4TikQqY8L+2o5uNIiw3ewIy6fbGuIMypqOFarbX/PdgjDQUik+nNL+FMTQ+PKrgaPPFf RLFoKS5EMY462R5cZeYcxmxjAGH9FzzauwCbax20wx78qLLd/LEkmNgVTTYL6Ci3Zi9R kVFhFUbdnNXztgVbDHWAgZGRUP8Ocp4B7e9RM+eoAWcLKGWyAe03ND8qxVebjDKc0mDh vl4xCp9EJblhrLoRHe/ICeo3LN7UGqAWMP3tzZcBezzp1HQVfmJbB2vU9YBURCPU0htP eVFA== X-Gm-Message-State: AJIora82WTESJjaigjzFrS3CF+QejS3gyjFpvPukBG/Ih9HunL4gPA9m ZCPMEI/VNol/RJ7B52Ba6AyzhZDalqs= X-Received: by 2002:a05:6402:4408:b0:435:9ed2:9be with SMTP id y8-20020a056402440800b004359ed209bemr15656191eda.81.1656057897642; Fri, 24 Jun 2022 01:04:57 -0700 (PDT) Received: from able.fritz.box (p57b0bd9f.dip0.t-ipconnect.de. [87.176.189.159]) by smtp.gmail.com with ESMTPSA id c19-20020a170906155300b006fea43db5c1sm697779ejd.21.2022.06.24.01.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:04:57 -0700 (PDT) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org Cc: mhocko@suse.com, Andrey Grodzovsky Subject: [PATCH 08/14] drm/amdgpu: use drm_file_rss Date: Fri, 24 Jun 2022 10:04:38 +0200 Message-Id: <20220624080444.7619-9-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624080444.7619-1-christian.koenig@amd.com> References: <20220624080444.7619-1-christian.koenig@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Grodzovsky This allows the OOM killer to make a better decision which process to reap. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 8890300766a5..4508791fe80c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2635,8 +2635,9 @@ static const struct file_operations amdgpu_driver_kms_fops = { .compat_ioctl = amdgpu_kms_compat_ioctl, #endif #ifdef CONFIG_PROC_FS - .show_fdinfo = amdgpu_show_fdinfo + .show_fdinfo = amdgpu_show_fdinfo, #endif + .file_rss = drm_file_rss, }; int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv) -- 2.25.1