Received: by 10.192.165.148 with SMTP id m20csp2089429imm; Thu, 26 Apr 2018 06:08:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48BEHWJ8CJ8HAD2HuwN6dHJxvzKExeQGj6Zb8O7b6E+7glpcv4j1uREwfH5vzEN0M4Fvffq X-Received: by 10.99.97.139 with SMTP id v133mr26808265pgb.285.1524748138243; Thu, 26 Apr 2018 06:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524748138; cv=none; d=google.com; s=arc-20160816; b=kcGDq1mRSOEaBrf0aH553zyNk7k0b1AZcqBPE1PuyTQnx0y8W1a4gR9jwiNr329VZQ 9zCYpHiBzIkqRX6SFCmu6BbibqxtW7pBYz98ci+CWTZ11Jcan50QYixC/AZqCCYcpJbW XQNTXRh1jU/17StraV4P/MAgMPwIa/bM0r4wW0NMDHnngSm6BdYuWPqYEd2nYKsRiZYh QIECXVSSizCtuKzJ2mmavTxCcqIQ0euXHBjFsY9yhXbLYmiRFjV901YYoG/w+dhfC1vT v4LeStraNukQaRnCPiPQVHuHH4Jb1iOPI7OUOC+vyRXQ6Jj+OiXAHHVYUOPVAuFUlSFu oFfg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+zPMwJFCkf0E+KLleWVzY96S0kxGWb2GJjvjXX+N+JA=; b=VxBRg3Ihh6gejIKxFUyFtIJlcEN868YKHNMH50HN+zpZ09z1T7E5Z/dfUHwksmUaS7 wRo//8IQRTUSMaPyUA63YlMURFyOBWLtShf30c4S7VwHWRZMOYfPMLKKy0AqdPrsClW9 jh0ZHNtuZ80VrMPjOokUPblu5Uw5kZ98PalfepAph2lTeArRh+poeJ8/zndO6T9udDGM Wqav1cRKubgM1h8N+zI3hWl9hIYyY8Gw6a7il3zoGeXjDI/uM6wr535BSE1wF/CE2eiL tDX062AT+SUyrM3up8N5uEQCCCx/bxuzRZtl1qm0c+jDC1zWU5fFNcfSEIjYF76KV8AR Lk3g== 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 t28si16095538pgn.328.2018.04.26.06.08.35; Thu, 26 Apr 2018 06:08:58 -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; 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 S1756204AbeDZNHI (ORCPT + 99 others); Thu, 26 Apr 2018 09:07:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:36137 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755671AbeDZNHE (ORCPT ); Thu, 26 Apr 2018 09:07:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C985CABDB; Thu, 26 Apr 2018 13:07:02 +0000 (UTC) Date: Thu, 26 Apr 2018 15:07:00 +0200 From: Michal Hocko To: Kirill Tkhai 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, ebiederm@xmission.com, dhowells@redhat.com, rppt@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] exit: Make unlikely case in mm_update_next_owner() more scalable Message-ID: <20180426130700.GP17484@dhcp22.suse.cz> References: <152473763015.29458.1131542311542381803.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152473763015.29458.1131542311542381803.stgit@localhost.localdomain> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 26-04-18 14:00:19, Kirill Tkhai wrote: > This function searches for a new mm owner in children and siblings, > and then iterates over all processes in the system in unlikely case. > Despite the case is unlikely, its probability growths with the number > of processes in the system. The time, spent on iterations, also growths. > I regulary observe mm_update_next_owner() in crash dumps (not related > to this function) of the nodes with many processes (20K+), so it looks > like it's not so unlikely case. Did you manage to find the pattern that forces mm_update_next_owner to slow paths? This really shouldn't trigger very often. If we can fallback easily then I suspect that we should be better off reconsidering mm->owner and try to come up with something more clever. 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. -- Michal Hocko SUSE Labs