From patchwork Tue May 31 10:00:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 12865252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAAFFC43217 for ; Tue, 31 May 2022 10:00:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9537A6B007E; Tue, 31 May 2022 06:00:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 68C606B0080; Tue, 31 May 2022 06:00:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 552156B0081; Tue, 31 May 2022 06:00:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 46E0A6B007E for ; Tue, 31 May 2022 06:00:22 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 2063A60308 for ; Tue, 31 May 2022 10:00:22 +0000 (UTC) X-FDA: 79525593084.30.8DBC835 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by imf02.hostedemail.com (Postfix) with ESMTP id CADDC80061 for ; Tue, 31 May 2022 10:00:16 +0000 (UTC) Received: by mail-ej1-f53.google.com with SMTP id l19so7699039ejr.8 for ; Tue, 31 May 2022 03:00:21 -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=RT3RFL0VBSkluM1f3vm/WSgrGA2Qjw/08Ja0Fnc8nAM=; b=pn14iMQ9n0FDWwmArA4Jf35k//oaml9s3mxFl2ky/DMcmh2eS5QQUAfVDrFOHrWe0F KMtAdL2ItYXoMBH38/cM7Y5adUTzh6hcJoR+bDw3M9kaX7/WIFSLDyC89uegMORBvy8a BHKTy4vuZTReGoejbiTSY6UKILNxobjAL1xvmGcoXh1D/U10MyxWoiEN1o6YdrZUfevt sj80RQonfCLZAawaQ34qBTRrlatRa3mUKNi0wDk1pC3/0cWVa8FNjNAuvChUXdFusk2T xG3+L8wayhRfjE/jFGd2K1s01WQzFRlhAG5nSv/aQI6SJBaKFuP7a15DEZJ3u2J3fVab 1s1A== 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=RT3RFL0VBSkluM1f3vm/WSgrGA2Qjw/08Ja0Fnc8nAM=; b=CzYpo3aerKPGHG38irdjEJz6e5hTakS7gxKJOHOSNSJIRy28tEjaq7oW0aYkyOEANg Xj0Yg8q53I0QzryvCkDtv6qv5x0mB4ZZcGSqbs4mEvR2mZyQBYXuMBQQUKR0NezoqOlv LNSDahThmXMRI3+5Rz0RSHT6xhxw31KH3kXdMIXTLdtmRMDPo4LNpNMTBhm/PbhLgjKC XOcY1ibma/K4yxK8iPqTrklZ6m6EOlXoO6kxdFi7aL6dPkTLhuNo8OCWilGFUKz5ntmT C+Ww1kBnF49Da/tDelmE7eYDCwsmU8jWGbEAiTr0EbRGCVxDFsQ2+6YPXIzG5FRrWu8h BIIg== X-Gm-Message-State: AOAM5312y0lPZ1Ht9rPToZ0N5suS0+yCBEqAJtVS5ChzzykJkmoJKRlM FprcyBTG3BOQpet0w7ryfsMbSgCYpJhG5Q== X-Google-Smtp-Source: ABdhPJw2HPaoRajF+IeqkgNAoVDs/MgxP3po1idYa4R4fWsq47S5BbJXHf6FD6GIdoI/D1SZlKNRiA== X-Received: by 2002:a17:907:2cc4:b0:6fe:2100:de21 with SMTP id hg4-20020a1709072cc400b006fe2100de21mr52095547ejc.462.1653991220342; Tue, 31 May 2022 03:00:20 -0700 (PDT) Received: from able.fritz.box (p5b0ea02f.dip0.t-ipconnect.de. [91.14.160.47]) by smtp.gmail.com with ESMTPSA id r13-20020a056402018d00b0042617ba6389sm582062edv.19.2022.05.31.03.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 03:00:19 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=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 Cc: christian.koenig@amd.com, alexander.deucher@amd.com, daniel@ffwll.ch, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, hughd@google.com, andrey.grodzovsky@amd.com Subject: [PATCH 07/13] drm/amdgpu: Use drm_oom_badness for amdgpu Date: Tue, 31 May 2022 12:00:01 +0200 Message-Id: <20220531100007.174649-8-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220531100007.174649-1-christian.koenig@amd.com> References: <20220531100007.174649-1-christian.koenig@amd.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: CADDC80061 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pn14iMQ9; spf=pass (imf02.hostedemail.com: domain of ckoenig.leichtzumerken@gmail.com designates 209.85.218.53 as permitted sender) smtp.mailfrom=ckoenig.leichtzumerken@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: oa44eye1qbmttkrduqnggb8mseubtzaz X-Rspamd-Server: rspam05 X-HE-Tag: 1653991216-457064 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 ebd37fb19cdb..9d6e57c93d3e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2651,8 +2651,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 + .oom_badness = drm_oom_badness, }; int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv)