Received: by 10.223.176.5 with SMTP id f5csp4183122wra; Tue, 30 Jan 2018 03:29:21 -0800 (PST) X-Google-Smtp-Source: AH8x224gb9USZwpYBsYXxJQqpGjOvp1gypyt0Znwd5O1UT4WalhuSpDL3hlnr54LdOe/lPaimDHz X-Received: by 2002:a17:902:32a2:: with SMTP id z31-v6mr25379093plb.345.1517311761537; Tue, 30 Jan 2018 03:29:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517311761; cv=none; d=google.com; s=arc-20160816; b=LVxjbEAKC/LLiT0msfE8P8T0m5avqbzzcmuJV7JFU2pVhMn98mR8PbHMEB6sG6/YHV esa+2Peo96fffiLwawUEKvxN9sSN+Cc5bRIQP/7c2y/K8V9uN1XCqfFvC9INYyMLDnrl sB/GLR5pitp2DBkKK0l5hwZFg40fPIbFrUTmZh9PanWPcXgi+sbh8DSJlP9o/ce/ZoEW dB/SXmNkskLj0yXn6Hq0kS5XVz9AZd6Ntgbj4mtR8x/pPiOWR/rTDFL3tzZG1zbyL8tq hltsTJe42CFlvQyuc/XReOlSb8Il0V4j/px0iwDiM0KFPsSJZrvS2NtSpJAqeRA7Nfoo 1qAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature :arc-authentication-results; bh=ALdtFH5/bfS3zzrzsQetD7MI10RpZYBaFtGJKvIX7RE=; b=r3qZ27i/xa8iRPjut852r7cVBggDOAnm0d1g54vuV3fgGUA3mUdqDpvKfxBGb9gwYF UqXGgEsW1BnYQaX6hTRxYE7K4EKfjJMBgo37f0FgHy3z42tPDEaLmzOD9AUS9FEaKXfS pEzrsN1rH99QPEfs9zbqKQhPOCYp97hfENOqrUNjRqBhS263klI4iciUVt+4etOE0IjR k0zzCA3nEvyGW/Zy1pTf89bi0SkBIJIYh+IW448kNKvCfNpVdy3KEgBvfEhN8Z4hiOVf H0kVxgjyigFmA03nkf2qQAQ1AmhYqa647XO5PxUi95Ujs91HntbjpwYYqJDmDNsjGD8s ncTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WDyMBC6y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s66si1112501pfe.356.2018.01.30.03.29.07; Tue, 30 Jan 2018 03:29:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WDyMBC6y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbeA3L2m (ORCPT + 99 others); Tue, 30 Jan 2018 06:28:42 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:39654 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbeA3L2k (ORCPT ); Tue, 30 Jan 2018 06:28:40 -0500 Received: by mail-wm0-f54.google.com with SMTP id b21so395224wme.4 for ; Tue, 30 Jan 2018 03:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=ALdtFH5/bfS3zzrzsQetD7MI10RpZYBaFtGJKvIX7RE=; b=WDyMBC6yZST0BDIc2uOkLCpI9ba5teZ3b0RPMPo+kz0fqJrSLRc6eVNJ14Gb5zWavM tit0rRYWVZdaPLFyqQ/g1s1Wg7URdPcNwU7iXm1vcrK7EDTgcSnQyTnbykR9WVl9cQN/ h9GOHqt9A3+HYEAL00v268zHs538yCLNhWE0YjZXnqC+BZMl0ZeamhGAfOe8Yv8Pv2b8 9g4z77k5W9brB8Wvftil1S5DZ3G3lkdrUhZB2KI3H2W1g8Xhxu0YQJ6t+m81Vpgu+F9u k2gNpmsiXT5ElYYu61HtMyUaRGnVUqIdS9XaPhl8lPzf+kOQ0Lo1Kc/e90Opjj8Ki/iS 7NBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=ALdtFH5/bfS3zzrzsQetD7MI10RpZYBaFtGJKvIX7RE=; b=fxNNbLeOQuuTB6PWq7KZx32E+oCtSA0b48TKFSPbFsZCjcWSiXISUQ3lKH/xFgjJBt 96XzrO7DL+4KVFPr0+qT4dlF3e4UKxzodtAZ7bwTB5PbHB2XZ229d3N0wsMAI4y0SGdA C1PKyLy4/PD5amXpScM4HiWjYn4/XxzraTcR1329HqJLMLh+NgH1+f4+v249VVow2tIy TonviTQ2AQg+o1YfVBKJP01iEP6Ib1cq6gMHidTy88igxJeYzgaTOB0o9GzoUlQ/whGy T8hLXtBRx9jf7XSOpQo2ViZ/6XtTXQoOpmcaGoVTJ6ehF7+Frb16E4b2ZKR4duqQnMHV GqzQ== X-Gm-Message-State: AKwxytfR/ljJl9QsITDKW3+AAdoJ5BjmuUIuo3oAyszcyQBqKF4vtNzn EGoTcEDjyzbrp5lpvbWLQVs= X-Received: by 10.80.185.37 with SMTP id m34mr46635664ede.214.1517311718793; Tue, 30 Jan 2018 03:28:38 -0800 (PST) Received: from ?IPv6:2a02:908:1251:8fc0:4c6d:7233:b7e1:3b88? ([2a02:908:1251:8fc0:4c6d:7233:b7e1:3b88]) by smtp.gmail.com with ESMTPSA id e12sm7129500edm.42.2018.01.30.03.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 03:28:38 -0800 (PST) Reply-To: christian.koenig@amd.com Subject: Re: [RFC] Per file OOM badness To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , =?UTF-8?Q?Christian_K=c3=b6nig?= , Michal Hocko , Roman Gushchin Cc: linux-mm@kvack.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <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> <20180124115059.GC28465@dhcp22.suse.cz> <381a868c-78fd-d0d1-029e-a2cf4ab06d37@gmail.com> <20180130093145.GE25930@phenom.ffwll.local> <3db43c1a-59b8-af86-2b87-c783c629f512@daenzer.net> <3026d8c5-9313-cb8b-91ef-09c02baf27db@amd.com> <445628d3-677c-a9f8-171f-7d74a603c61d@daenzer.net> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: Date: Tue, 30 Jan 2018 12:28:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <445628d3-677c-a9f8-171f-7d74a603c61d@daenzer.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 30.01.2018 um 12:02 schrieb Michel Dänzer: > On 2018-01-30 11:40 AM, Christian König wrote: >> Am 30.01.2018 um 10:43 schrieb Michel Dänzer: >>> [SNIP] >>>> Would it be ok to hang onto potentially arbitrary mmget references >>>> essentially forever? If that's ok I think we can do your process based >>>> account (minus a few minor inaccuracies for shared stuff perhaps, but no >>>> one cares about that). >>> Honestly, I think you and Christian are overthinking this. Let's try >>> charging the memory to every process which shares a buffer, and go from >>> there. >> My problem is that this needs to be bullet prove. >> >> For example imagine an application which allocates a lot of BOs, then >> calls fork() and let the parent process die. The file descriptor lives >> on in the child process, but the memory is not accounted against the child. > What exactly are you referring to by "the file descriptor" here? The file descriptor used to identify the connection to the driver. In other words our drm_file structure in the kernel. > What happens to BO handles in general in this case? If both parent and > child process keep the same handle for the same BO, one of them > destroying the handle will result in the other one not being able to use > it anymore either, won't it? Correct. That usage is actually not useful at all, but we already had applications which did exactly that by accident. Not to mention that somebody could do it on purpose. Regards, Christian.