Received: by 10.192.165.148 with SMTP id m20csp1688370imm; Thu, 3 May 2018 03:54:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZozXdk0r9dfiYsHFrf//qclr9Tcd3YMncntLACKAw962iSwiMpsCdnkctEPJNDdiWhO+fQr X-Received: by 2002:a65:4b02:: with SMTP id r2-v6mr18667352pgq.82.1525344885056; Thu, 03 May 2018 03:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525344885; cv=none; d=google.com; s=arc-20160816; b=uHiPgsXPUKWyhGakKo9tIxa8lQFUJ7DOpAEWvzFacqg4s6KcdQJBQMJNcb0cqoqYaH Dq1sklgniKaCkMBuToTM/fISJuDaxN9NvMWHyUhGQoLD2a9vMteU/Zld6uE5qj5Kzrpx lAWUlUtA5mZSwGnk/tu5xWr13p/Zw79skSe9RkzjWE/djll5dquhk2P919c4kRCG/JWO +Iu0I2CUiMXV0D++4iGq4D3RVBsZUCBGIDb8XBlaxaTFoQxDbjzYgyv/wRHxuoynfLtU jBdsycP16fjqjFmjNO01iTH+0oqT0J3mNPsOFnuV0oEKNgYxySA6WYeJAq8/ShJFF/kB 7Oug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=pUsB2/xLdys6R4o7W28Ke5jV1JnD7de8bFvhOOXfbZg=; b=WsDpx+JnGju8aS4T8ezPul1MUtbUhwFrfOQp3emAEd4qx84C5mVJ84+CX0EX4pQBWX gvW9H5pR/rB9ew5Q0Ou+N5HGUFK8+lzv+TNUIyzIEJO521LaTjhhtUjJ4XmIi0lsLFKc 5RQPrjox9F+r1OhXifvI6rsNgCJ+rxlDvLILoteKx2vXC6lUZAlZP+kdv7YbKj7wlwR0 jkUKS94ZKvmwirxMj/5rMC4qgQqx845szYHfAR6lAH6LcmvKZQEBajhVCt2BunI9mqVo aWZQ9meKScFyp0BpHW5SPn1sOgyF0i3U63HWfXmeSMXK3MsldtIyZMlyA+KTXqor1bPB zhqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=DQxw+i2d; 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s62-v6si11279344pgc.216.2018.05.03.03.54.29; Thu, 03 May 2018 03:54:45 -0700 (PDT) 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=@virtuozzo.com header.s=selector1 header.b=DQxw+i2d; 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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbeECKxC (ORCPT + 99 others); Thu, 3 May 2018 06:53:02 -0400 Received: from mail-eopbgr50116.outbound.protection.outlook.com ([40.107.5.116]:18464 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751354AbeECKxA (ORCPT ); Thu, 3 May 2018 06:53:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pUsB2/xLdys6R4o7W28Ke5jV1JnD7de8bFvhOOXfbZg=; b=DQxw+i2dU72/A6si3oYEl5Z1oxg6p2SxxCEB7L6s8MIaP1Ut9fHO8RzQu7EZq3Lr/1a96+5wcFxZQvBckboXu3/PVlSezx3tLpd4RGQlQjlMuGNd2Vvupc+zqNjVXybu6v6i0JCwuDa8PjD+iEYr7LA4WEXhwbX9CmdwEjo+rbA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from [172.16.45.234] (195.214.232.6) by VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Thu, 3 May 2018 10:52:54 +0000 Subject: Re: [PATCH 0/4] exit: Make unlikely case in mm_update_next_owner() more scalable To: "Eric W. Biederman" , Michal Hocko Cc: akpm@linux-foundation.org, peterz@infradead.org, oleg@redhat.com, viro@zeniv.linux.org.uk, mingo@kernel.org, paulmck@linux.vnet.ibm.com, keescook@chromium.org, riel@redhat.com, tglx@linutronix.de, kirill.shutemov@linux.intel.com, marcos.souza.org@gmail.com, hoeun.ryu@gmail.com, pasha.tatashin@oracle.com, gs051095@gmail.com, dhowells@redhat.com, rppt@linux.vnet.ibm.com, linux-kernel@vger.kernel.org References: <152473763015.29458.1131542311542381803.stgit@localhost.localdomain> <20180426130700.GP17484@dhcp22.suse.cz> <87efj2q6sq.fsf@xmission.com> <20180426192818.GX17484@dhcp22.suse.cz> <20180427070848.GA17484@dhcp22.suse.cz> <87r2n01q58.fsf@xmission.com> From: Kirill Tkhai Message-ID: <4d9cfb63-dc7f-1469-161d-1bbce3d0c393@virtuozzo.com> Date: Thu, 3 May 2018 13:52:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <87r2n01q58.fsf@xmission.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: CWLP265CA0199.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:4e::19) To VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::28) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:VI1PR0801MB1342; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;3:Nfwb4esjX3nTGYiapcH+nDssy+6e1nMeWT+9hVFP2HFv5P739p8JW24qun9NGqm2kuOrhZ2LJd6bN3r11wLpgF+qbpRDAhVEj3FOHzx9r4NRFyPgV+paYYN33Dy1A2zcEnJgmSRlbPcfXF2Q/79FdH8ELpuIprUu0hAx+S0ziMxHa00xx0u3orNigCdt6SaJ2siUs64DmPKWJPYYYVP01r8sI5aLbUbACSq0zI0du2H4rtxUzBNwC/0xxdEjMRnt;25:jDJE+Qi2oNwxUMxGeSsC3ufN2PLjNHKJZz4AVh8QMXhZCtnxx13SFc+uHofqJqPXIhCEsam3Sz0ByJmSKKZfvsIdRi2eriffaJpeVQhEHlOzJCIQsOFD0ocy0/iSqGxLbhhAqhRZfj7HsH9ctn/8xkSsrXvYSNRYCy6tTSjiYOoA9T4+gDWMVgwK8V8XPBEy4UdJgSnZm1NgB4GJRDZSwJ855F704AL3hSLpuS390nooyQbkQ6HYib0DbOSkQX4TWtgRmD0jb6XDyKoz+T9ZoCMRgfa7/qxdUZlJVKrD65BKXMxlGJDDpbCAB24r5lc4UVJA3UYdamCcjYqaX89ILw==;31:5xOOyZbKUNOT1lO1le6PCkWJ6nKXNaeGrpL4ORkehLf3ZRCX3USr7oqGvi/lszAPIZOIdQOcjZ7aYRGzQxESncO/41BBl0FfAcAEEKcNPwqrNN+QeX2zKeCgHq4TEfJ3IjlR5ci7q2iAh9iplD2BIf5PSWevwYfRb2QKjTPzShPH7h40/Vbz9c1HxBPiFOC1jN106wRbrCvcqHZ/saBrpOCb5rhSL8sBxF6UVgvSXWc= X-MS-TrafficTypeDiagnostic: VI1PR0801MB1342: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;20:CI3plXukRcrzd2Re1YdDap3p1W4vA2XgZXvx9bmLFyetNIZx2L5d1xHQaMQR861KlcCMkuboPaP+2eMb+gDJgTvGgaRmZDDX9xVKOE/m3PnuE2maNBmGX2qEiWV8r/1yEwB/J44aFmxiYrEWX9VQRf7km1EkevOAFJ2qUkK4iHIVgd/UPw3/4zh8y6EMLa/AhwhBYq2jOBwsLE82wEAs5JdVPUrPaiVojnvEC5IZMh02Z5rUHRAxMXrAFsjMDhb9qmwp3sESPFdR8NCEg1jxEodfUTo5y4udlkIgYqQ/7EvkyinrnUyJf6MS7F6iU0YTyEgJ1wwUNR5C1vEOnpKrZ+oL96gT9jsfcisM4DTnjq6/keP1OUBOkN3WzWMy28eEkiICk6LV0CXEjzdB5Vgc+fRl8da569cqWCQVwaW21Nn7cTgtGgzBdAcNXnc811qJPYvjifJcdVCZQTfsJ9UVx3b7fUo+8tDySZ/cTBChU4TJz4NMJ8Q1MO1Jmi/cJUjk;4:1uujQ57kZGQozeAZyo9HGjYWYCYq+obLE1/mOqpznj608+gIBnaaLSqYQ7QdH+Wz1JAnoMiXyshNanNA6CnqbVQ7dpRRaj7+svNkqnV+sI9utbTzHaAK6X59qUmQbjqfLuaIJif6Auxd2qJWP1BopcPc7IL8jaVS4xnVQ/SgyiWR+BJemsVCM2IDMmxj47ORRcouhO8/BHvYZ/o6biOXf+UUHZozPR0QsonvZVbUsa9ovLbRYC1hjHkda4SMtaK20f05n/evCTQIQSLDGpvu36pBhtAbDZlSdg4/Xwy2bJZXOgst/gW/2yYNf9JHV9IL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42068640409301); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6041310)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:VI1PR0801MB1342;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1342; X-Forefront-PRVS: 066153096A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(39380400002)(376002)(346002)(396003)(366004)(39840400004)(189003)(52314003)(377424004)(199004)(478600001)(6666003)(7736002)(6116002)(8936002)(3846002)(31696002)(16526019)(31686004)(230700001)(956004)(476003)(8676002)(106356001)(25786009)(39060400002)(2616005)(6306002)(486006)(446003)(86362001)(316002)(5890100001)(6246003)(966005)(11346002)(81156014)(81166006)(16576012)(105586002)(53936002)(68736007)(65806001)(26005)(186003)(66066001)(6486002)(65956001)(77096007)(47776003)(36756003)(305945005)(50466002)(7416002)(2906002)(52116002)(2486003)(23676004)(5660300001)(53546011)(52146003)(65826007)(93886005)(110136005)(386003)(97736004)(58126008)(4326008)(229853002)(64126003)(59450400001)(76176011)(55236004)(6606295002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB1342;H:[172.16.45.234];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4MDFNQjEzNDI7MjM6NGpBSENMMzJFclJ0WFE0SmRxaGNJaUc0?= =?utf-8?B?QU1yQXFLQUwyQ1QzUFBXRFBqYTd1MG5GNnJMcmpENnpFWVFxZnRHL05OMGkz?= =?utf-8?B?Rmd3TFdLcTBCcHM0b3VKL0YwaGp0cEpzTjhUVWFnWlYwekw1YVBoQUJvSTZJ?= =?utf-8?B?OUNZNUVWM1BGR0IxTkF1TFhtbXdEaEFzd2YxekdFMmhsN1VHaUd1MXFRc2hD?= =?utf-8?B?S1YyYTRGcjRvcnd6dD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N02DfvzkvDw2HSkhxTnYayjSs3mL2IandUg2J5N9pucwbWc+LpKN+T5v8=;24:KD6nkX0Ty+Cqe04n2hisA/xiDcJOI9mFr3h371+5Kk/v+folpj3FihnCysRd3zoCH6btI4jcAUi/ndMbYJlgprQEim8NsXyV7LTqHMOJIcM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;7:+wVzrMLt2t/Gg4mAl2xV4tQOO5J4lPZGD+UTB5uro92w9PUwf003VEGfe7EFt5+w4UMS0aZMNO9Nzk8L+Qm8ewKlloGDryfTLQNuX3hl1UjWQWvL8GZXl4vSLCDTlm8Ub0aCeGyIiLmTbK2hjbaeM9FV0NvWSq4lnIriPnYcbawwDYTtanDPLLs5Woci/cB+ppHZ72ROV9EmhSQv//rirzMwtzXtJyIAtUJEtiryCF43EVGHVKiJaLq6iH088zox;20:xGnbXyxsBmsUpEsDaf40tinXQd3xvIRXoyP6RVDuPCTKMqFcozWSvbNQuJvXv8qub96L4CEGQkYVHGdFFje4/i5B6lGVTxikCc1G+oHNJbx+UkLdKEGAZesXF8Gk3tqY6aCl4y0IsPsIOs4LWI6mdwcGX7e+p8ZqkEhUFTH/S+o= X-MS-Office365-Filtering-Correlation-Id: f79c161a-e8ff-4a7e-0d39-08d5b0e40775 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2018 10:52:54.7405 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f79c161a-e8ff-4a7e-0d39-08d5b0e40775 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1342 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.04.2018 21:05, Eric W. Biederman wrote: > Michal Hocko writes: > >> On Thu 26-04-18 21:28:18, Michal Hocko wrote: >>> On Thu 26-04-18 11:19:33, Eric W. Biederman wrote: >>>> Michal Hocko writes: >>>> >>>>> I've had a patch to remove owner few years back. It needed some work >>>>> to finish but maybe that would be a better than try to make >>>>> non-scalable thing suck less. >>>> >>>> I have a question. Would it be reasonable to just have a mm->memcg? >>>> That would appear to be the simplest solution to the problem. >>> >>> I do not remember details. Have to re-read the whole thing again. Hope >>> to get to this soon but with the current jet lag and backlog from the >>> LSFMM I rather not promis anything. Going with mm->memcg would be the >>> most simple of course but I have a very vague recollection that it was >>> not possible. Maybe I misremember... >> >> Just for the record, the last version where I've tried to remove owner >> was posted here: http://lkml.kernel.org/r/1436358472-29137-1-git-send-email-mhocko@kernel.org >> >> I didn't get to remember details yet, but the primary problem was the >> task migration between cgroups and the nasty case when different thread >> grounds share the mm. At some point I just suggested to not care >> about semantic of these weird threads all that much. We can either >> migrate all tasks sharing the mm struct or just keep the inconsistency. >> >> Anyway, removing this ugliness would be so cool! > > I suspect the only common user of CLONE_VM today is vfork. And I do > think it is crazy to migrate a process that has called vfork before > calling exec. Other useses of CLONE_VM seem even crazier. > > I think the easiest change to make in mem_cgroup_can_attach would > be just to change the test for when charges are migrated. AKA > > from: > > if (mm->owner == p) { > .... > } > > to > if (mem_cgroup_from_task(p) == mm->memcg) { > ... > } > > That allows using mm->memcg with no new limitations on when migration > can be called. In crazy cases that has the potential to change which > memcgroup the charges are accounted to, but the choice is already > somewhat arbitrary so I don't think that will be a problem. Especially > given that mm_update_next_owner does not migrate charges if the next > owner is in a different memory cgroup. A mm with tasks using it in > two different cgroups is already questionable if not outright > problematic. > > > Kirill Tkhai do you think you would be able adapt Michal Hoko's old > patch at https://marc.info/?l=linux-kernel&m=143635857131756&w=2 > that replaces mm->owner with mm->memcg? I was at vacation. Sorry for the late reply. > We probably want to outlaw migrating an mm where we are not migrating > all of the mm->users eventually. Just because that case is crazy. > But it doesn't look like we need to do that to fix the memory control > group data structures. Kirill