Received: by 10.223.176.46 with SMTP id f43csp642612wra; Wed, 24 Jan 2018 03:52:14 -0800 (PST) X-Google-Smtp-Source: AH8x224vCwv2WtRH05c80sf5poeaYqRN8C0YZan65Xo9t8GbBIUgpkIlhUeA7htqPJ4y1PzdQCj4 X-Received: by 10.98.8.86 with SMTP id c83mr12862005pfd.84.1516794734078; Wed, 24 Jan 2018 03:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516794734; cv=none; d=google.com; s=arc-20160816; b=EYoh9v0oBylhNbLnX8kdScTA6D7sOZi1eZTmn4G3hl6b0558fRtuhY/BKsfZ6uuozV rua+SH0ONFhqPFlLOvBqSuhmuFtypstAcWT0MiyFOj20RLzVjHVATc6nUSduanXAEY4t +4hIGVGQ+5GqoIyVw3p6233ZBJJoJWbe4KdaorA5RDR82REC2tFAnLO++dArxAPPgNsF rlimHCy5iJ2n8XnKIboJn1IdJcFaCbhjewvMymEPT6MxbUEtQD9STsPvLDSYyXEO6VrY J92jCRjlX+QOxQmH258YaMV2Ej4UO43CKMyqFXoF4CAWvRJU0+6Ohu2MQWWdaD0AwJ31 6Gfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=v51zmQFooyFc6UWE0KqHuLrGWafswHyVbnUkIcsZPHU=; b=vCRbHuNRbD/5L6NubcC2ZxZf8vUb08abWCrRcVihTFlZeHqQBXVVCt8eY0NyZES89q SsDUc/RhzkszDjvjB88EXclKXhy09fgFk+8s3Sg0rl8/za/O4RbDthPbC70sTh2Bdixz 5v+G7YoS1A5SSjvVXVA9bzNAWkQIPeNNglcFOyXZJnMsxkpCe2qfMjXKdibm6btNlWem /1ZoZvBlaxwMXEBbUKL3+7NTIznLyzlo3UBiaCltwn4IYQrUh31hGdWkiDQaGpQZ/B6r +LW4afuSrqAs6BArU8RtoTtagiNZsCMhajo59x5xnpX1BFb98lE6WXJg2deQqHPQl/Le GLwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15-v6si56324pli.182.2018.01.24.03.52.00; Wed, 24 Jan 2018 03:52:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933454AbeAXLvD (ORCPT + 99 others); Wed, 24 Jan 2018 06:51:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:53971 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933261AbeAXLvB (ORCPT ); Wed, 24 Jan 2018 06:51:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5540AAD72; Wed, 24 Jan 2018 11:51:00 +0000 (UTC) Date: Wed, 24 Jan 2018 12:50:59 +0100 From: Michal Hocko To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Christian.Koenig@amd.com, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, Roman Gushchin Subject: Re: [RFC] Per file OOM badness Message-ID: <20180124115059.GC28465@dhcp22.suse.cz> References: <1516294072-17841-1-git-send-email-andrey.grodzovsky@amd.com> <20180118170006.GG6584@dhcp22.suse.cz> <20180123152659.GA21817@castle.DHCP.thefacebook.com> <20180123153631.GR1526@dhcp22.suse.cz> <20180124092847.GI1526@dhcp22.suse.cz> <583f328e-ff46-c6a4-8548-064259995766@daenzer.net> <20180124110141.GA28465@dhcp22.suse.cz> <36b49523-792d-45f9-8617-32b6d9d77418@daenzer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <36b49523-792d-45f9-8617-32b6d9d77418@daenzer.net> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 24-01-18 12:23:10, Michel D?nzer wrote: > On 2018-01-24 12:01 PM, Michal Hocko wrote: > > On Wed 24-01-18 11:27:15, Michel D?nzer wrote: [...] > >> 2. If the OOM killer kills a process which is sharing BOs with another > >> process, this should result in the other process dropping its references > >> to the BOs as well, at which point the memory is released. > > > > OK. How exactly are those BOs mapped to the userspace? > > I'm not sure what you're asking. Userspace mostly uses a GEM handle to > refer to a BO. There can also be userspace CPU mappings of the BO's > memory, but userspace doesn't need CPU mappings for all BOs and only > creates them as needed. OK, I guess you have to bear with me some more. This whole stack is a complete uknonwn. I am mostly after finding a boundary where you can charge the allocated memory to the process so that the oom killer can consider it. Is there anything like that? Except for the proposed file handle hack? -- Michal Hocko SUSE Labs