Received: by 10.213.65.68 with SMTP id h4csp419178imn; Wed, 28 Mar 2018 06:13:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx49i0PKahEl1oovUB4sGPgrnnJeQxSA5MTUUizVt5w+iN4BWya3JgRaSPZ/ZxnaHfK+K19Vg X-Received: by 2002:a17:902:d214:: with SMTP id t20-v6mr3717673ply.209.1522242790522; Wed, 28 Mar 2018 06:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522242790; cv=none; d=google.com; s=arc-20160816; b=YVJFw9tzJHOE2OKeFsgjwsqT17Syu1GVn9rw2v2yTvHZiWex0HZP1miO/NN4Tqfeve iCvPReuxM03oWWmuvTSa6NmGafAYPIerqjg0iGcQKmsQmjRCCP01r4YNk3IUiNk9ZOpD X1TqzJsbaRYfyPItSwjWy3YMxaE0QYX+2RtPv0Btzcc1mW+wGwQICKflY+mMfbYr7q0J u5TA5K3DlaTkl4rcL6Mio6pNrbhQcwVUyzh1gV2rK9yYED6IVhhcekFxUg4SIAmSZF0k PXLiW4Dcm68AOks6+7Pg1ATM8y74lcyppAc7i4aOFzQDysbM9wmkasxU+akGhMZfsKjw MrCQ== 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=ebycwLSIQZBz4YB1RPOnSDGK10muJYtXXJYlthDNjwQ=; b=OnN9ULE725D/WWLDtChqclVtypLtBMQw4XIc6K57epCTWfA3HEMkJvD6CbriJs6L9t Ga3wG0ctUY8oS//Txssk/pjsYGGtcH+Wz6EpusQJ7uyd6FBr0wlK7K//GuplO2uiNIhw XqQlw4q4A/QUWSbU5S9tzOUf1CGNIXEXaTs3mosuAt//lTLZUB5TA+QmIN6BhparN4FJ 6BFAbovozEkSfid7H8nq8k5BQ6VB4qPeBqUJt+xtBrMgwYvVLy6esDxuMFvdSLXiZzQ7 qsfCj9fLrvgTxlQ50UVCNYNX4zbwwQkJYjrsjkPg6FeRi0ZBnrL9Zh0+h7h1lNbWFsMR rqaQ== 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 l15si2461294pgn.826.2018.03.28.06.12.33; Wed, 28 Mar 2018 06:13:10 -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 S1753319AbeC1NKr (ORCPT + 99 others); Wed, 28 Mar 2018 09:10:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:54364 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753148AbeC1NKp (ORCPT ); Wed, 28 Mar 2018 09:10:45 -0400 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 9C1C5AFF7; Wed, 28 Mar 2018 13:10:44 +0000 (UTC) Date: Wed, 28 Mar 2018 15:10:42 +0200 From: Michal Hocko To: Cyrill Gorcunov Cc: Yang Shi , adobriyan@gmail.com, willy@infradead.org, mguzik@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v2 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct Message-ID: <20180328131042.GL9275@dhcp22.suse.cz> References: <1522088439-105930-1-git-send-email-yang.shi@linux.alibaba.com> <20180327062939.GV5652@dhcp22.suse.cz> <95a107ac-5e5b-92d7-dbde-2e961d85de28@linux.alibaba.com> <20180327185217.GK2236@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180327185217.GK2236@uranus> 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 Tue 27-03-18 21:52:17, Cyrill Gorcunov wrote: > On Tue, Mar 27, 2018 at 02:38:11PM -0400, Yang Shi wrote: > > > Why do we need to hold mmap_sem here and call find_vma, when only > > > PR_SET_MM_ENV_END: is consuming it? I guess we can replace it wit the > > > new lock and take the mmap_sem only for PR_SET_MM_ENV_END. > > > > Actually, I didn't think of why. It looks prctl_set_mm() checks if vma does > > exist when it tries to set stack_start, argv_* and env_*, btw not only > > env_end. > > > > Cyrill may be able to give us some hint since C/R is the main user of this > > API. > > First and most important it makes code smaller. This prctl call is really > rarely used. Of course we can optimize it, but as I said I would prefer > to simply deprecate this old interface (and I gonne to do so once time > permit). Ohh, it would be really great if we can remove this thingy altogether. I cannot say it has a wee bit of my sympathy. -- Michal Hocko SUSE Labs