Message ID | 1516294072-17841-2-git-send-email-andrey.grodzovsky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8F4F560230 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 18 Jan 2018 16:50:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8159220572 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 18 Jan 2018 16:50:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 757D527F85; Thu, 18 Jan 2018 16:50:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 04E2F27C0B for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 18 Jan 2018 16:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D71FB6E6B7; Thu, 18 Jan 2018 16:50:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0089.outbound.protection.outlook.com [104.47.36.89]) by gabe.freedesktop.org (Postfix) with ESMTPS id 836C36E6BB; Thu, 18 Jan 2018 16:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OMbhEDrGx2n7iz8GzR/RoA25CSrq4hNiFU3zbl7n8oU=; b=YJjhfKABrp/njY3S7tEXPDD2hW0HW/UvGeWrWuYA8j+s4b7xIZXNUJO+A4/hgbVuRoCUQ2fUP1QNYKkr4xH3szQZzggoERjgn9DF7YJAavseG4BQXUny2pH2PLP6q+TaxZPBGj2kxa/t4SvoPIfABZMMabl91Rxj8v4HqacziAM= Received: from CY1PR12CA0081.namprd12.prod.outlook.com (10.163.230.49) by DM5PR12MB1450.namprd12.prod.outlook.com (10.172.38.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 16:48:37 +0000 Received: from CO1NAM03FT039.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by CY1PR12CA0081.outlook.office365.com (2a01:111:e400:c42b::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Thu, 18 Jan 2018 16:48:37 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT039.mail.protection.outlook.com (10.152.81.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 16:48:36 +0000 Received: from agrodzovsky-All-Series.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.361.1; Thu, 18 Jan 2018 10:48:35 -0600 From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> To: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org> Subject: [PATCH 1/4] fs: add OOM badness callback in file_operatrations struct. Date: Thu, 18 Jan 2018 11:47:49 -0500 Message-ID: <1516294072-17841-2-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516294072-17841-1-git-send-email-andrey.grodzovsky@amd.com> References: <1516294072-17841-1-git-send-email-andrey.grodzovsky@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(39380400002)(39860400002)(2980300002)(428003)(189003)(199004)(36756003)(104016004)(316002)(305945005)(76176011)(68736007)(53936002)(478600001)(16586007)(48376002)(50466002)(54906003)(110136005)(356003)(72206003)(106466001)(86362001)(2201001)(4326008)(105586002)(2906002)(77096007)(8676002)(81156014)(81166006)(50226002)(6666003)(8936002)(5660300001)(2950100002)(26005)(51416003)(53416004)(97736004)(7696005)(47776003)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1450; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT039; 1:FxfHD2CS5bD/VBpSh3fLHhIKVxw1P8rRIOa2HoCaCuHx6LlloslFx/sU02pGtmiDrw4UzSV/iuK0uwjRWQIq0d/7o/s0aJo1RGdtjtP0pKUJLiWZy/IHKTIvPcuhQTeU X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73bbbfa8-cdc3-4bde-967c-08d55e9351f2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060); SRVR:DM5PR12MB1450; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1450; 3:mYSYFhXzqpVzxPs+XkKQnA1rarH/pkJvnocYnLqih9xQE+EH/pTkGEXj0dk719ewMxOf4TPgbRRBopheroXRehUlgGhipZR3xpdMwoYRmz+sBdKMsd48CMWhyOZMcR8/iWUs+sBYv/njYqvltC3TbSPd21wlwDkwGMpz49Hfy3/yNB+AtRkkndtwVArj/ZQ7fV8ABQU535WhWmoLDlIbbV/UPcPcsaI9no7SDbNa1krQ2hH5eSDwMNkKfEZB+x/uv3+WgSorImLFEaADuUPKDpy0Tsf45lFmobNSBp435ppPPtHPR67nUCtP/Cl05gNAmslfcz2ryFcVwnqtjXwDO7KeV0A5ypIfZPzOZXpfOdI=; 25:vuY9vM3kauq+VYHJgxuHdBoGbdL2g6teB5JAIRBeD955sS63m6RQy6bvU43CxAGgBTKfpGmcijxapVFQwlbiI998zrE60QGFA6HJQGuZOWnJrp+gsaWyEnvJ/O8lrGPFInPc3uRHvB6/4NfTlW2PBZDP7rbLk8tcTB/nKCui47WdsTLkwtRWkwdIbGkuHLIG4TTH7RZ0SptF8GejPVorGTA0Pw7V2dSDRmASK7YgvEVWCm5mRWYTb7XEpohNLX4GuiWPpDYVxpdivWwBtALEuvjdGcsyohvVhoG5CK8D13md4aeUHZIyahOr8/kXELlx9kPh328UKFwvaoXg2bsPLw== X-MS-TrafficTypeDiagnostic: DM5PR12MB1450: X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1450; 31:k5ObE/FyvUwr0j+/FXDKLeANKrtSqBoHqeEx4McsmD8lFqGj6zmJwCs9oh5On6WDMOgTPWIQaZOwEYgavn/9xysp0Tg2J6vLoNk4xpdAhPmoWRGlgxuNwStDKbqyNTcJNnaKyVDFfjCe5Df1e2ltWL4PNdnu81KEe5k8xzOhwxT88KjbfevFddXrfhafMpMeqzLun88wsGLSUwyUhKS4ufhhimYjkdoZYV8qov+fem0=; 20:WtSzgTF7+y6VGMJOvkujRuLcfThdMyNzzcDacUD0okLCkvSgbxqR64R1Deg4hSW3qoRDSg2SwcQZrcdK6exMHbNWQ3644tpH65kwl6in5RkLNL2ODrs5Wg2mbczj0YLpQRpLxjMIgunOe9aJu9VgOVLC52EtnOsBz/+dZJlOyGXEoTEhwWAhoBMwHpIbCfXn9bhOCQhO6nygBssgvDt7mDiJL5ZuDKGMUyht9KdZKdfp6kmRuZH0Z22wOWp64Ca4rIXHNaQelkuO90Y00Xxb0oiwDxguYNu/TuAje/99im052g3cLW0A9Z8f99cRbdVngvELwv0xzNawvBNIv7joqlH2sHB5CRRpm/n7yVeK0kD87OLOOnYidGwvtq0dIYe+Jf1n7fnV1a6XhUH0YB0EkI45NzaxH9/HoVQO0juWvAU4L7+CSXVayMJKDwQWcJKhfn2Bn0Jd5ABV4Fm9dlWiJxNxY31YA9VCKf9gRVpWERnxCd2i0Ce8SouywVEu0v9K X-Microsoft-Antispam-PRVS: <DM5PR12MB14503A7768246D6BFA92583EEAE80@DM5PR12MB1450.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93003095)(3002001)(3231023)(2400064)(944501161)(10201501046)(6055026)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR12MB1450; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR12MB1450; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1450; 4:+6qKH2jOAtc03wKuFLqZQ80rsdWcY6U2/Mef22D9fvdddPiKYsgK/UUjgolxRzMO83nWj+S+NaRN4fpbW0sRgWv44FJhADbM0Jdfe7IWbgwqIyX74qf1HOQ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RWZqbdpqyJRmgQveK3InP0iqQeolAXmPgpxoorKAj/rENIRY=; 24:oM+qeJuSDwTE4LJqQ3Gw6vrb+J/s8JgvJgNK129MhKAAeLbR9+wNuLZ41W5sRD6JnsiGvz97+3PdeXzq3GMoGm8v76F64rSRbg4Hnfhez8c=; 7:6QwCWSerVRdNsB1kBrB0A3Ap4cqVLX2TuKx1G26lu4jwYFoQ+b80euTWr10DmvWn4Q7l5b4L9ZuMTO7vA55lC9u/4G3eHuI6uOtxvSN/j0ZVDKGUqjRKigyzaDfwXQP9WjXPGsNAhS3ytErxYqUpp3mQkS/aP02uASQm1aScVAO2dtmmLSHnjgTdV80ZJhTXF/jpV5fRkSDMrTclt2X1H5mr3w05OxxRSFqSt+L3Md0ZIxyk8aKQJFmQzrEiGb1i SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1450; 20:gmoaYW2l/OHZ2OLQxlKtOgbO6siWLyladMGIBggV1HF/RJkyNZUVlkNU6+TgeTKTdy8ERsiZWZY6/j9Nf5pehl9K5n83J6NuKLj1NbWrPSHvy0zCSPVJ+aP5F3Auw3RpGlCcCD3VmC3+9XghLCTOigG6aCttg/JYNAFTw7yXZmKS3N+qb9wA8GvKsLv9KmLNmuScuSYjyNVhYA28C5B8hDxg6ztYTYvEwyjwROfGyK64nFqDZ0/2N/HBM1xsqj6P X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 16:48:36.8974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73bbbfa8-cdc3-4bde-967c-08d55e9351f2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1450 Cc: Christian.Koenig@amd.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 511fbaa..938394a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1728,6 +1728,7 @@ struct file_operations { u64); ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *, u64); + long (*oom_file_badness)(struct file *); } __randomize_layout; struct inode_operations {
This allows device drivers to specify an additional badness for the OOM when they allocate memory on behalf of userspace. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- include/linux/fs.h | 1 + 1 file changed, 1 insertion(+)