Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1992937rwb; Thu, 29 Sep 2022 05:03:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5rrXo3tL63+60a3rtBk9ALXjK0Fkb9ITVO6urcGRRUy3zxCksHNU/oethAphRlZBxci8lh X-Received: by 2002:a05:6402:11cd:b0:452:199e:7cf6 with SMTP id j13-20020a05640211cd00b00452199e7cf6mr3029162edw.366.1664453036811; Thu, 29 Sep 2022 05:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664453036; cv=none; d=google.com; s=arc-20160816; b=KCmNV6EIkHwxoi8+25A2YPkE09/I1yAvgN3gwjgIs5UzKACdAGl/Ouna9CQ+iqgwVb /lkVA28gi4Y68rhdIu/5dkzFWzMR0W+K5Lu+mLu2fdycV+wtnI4y852zhEtzj5dh/C1D pk1/AHImG67ug/5BMuXzUkZ38vU3S64eVK1LJjzHBhbvnqePQeqyATqhgcmdtpugsfcZ nnorfm1Oi5EICv4yMMBuNT0q7uHYqDxF4u8KiGOe3gOHXvs+KqEVrKHwlfrbBp0fjw+l dp1myArAB2pAfuMGZvepK2G1gxDBh6VNuenbGe0OpjPt1frM3Flzr47WUmLQ/zm/J1Y0 4PLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=urbGd3LAjOpWbVvqm9mfXm+G/l17iKcXVGqxKpMeX5Q=; b=0NQNAYhoyQcwtVCjyyy9eH8LorZOoTR5BLKyCHDfJfDIHSkpiYEgNSqQTUYdRwDdjC NNoW1ecYjbZ1kgco18lcTWGyEW0LAeAZsi91e16hcBANr58pZDZVjBdBiFp+nlFRklDl 4FCClbvSCBhSuayEgjMJvlAFz0Lm8cjflQd6x4+X4/JXOcok/lCjLuW+WXeIvUlyF4lD 9w2X0hziP+gbdp6qxRhz0MHroD9Q53LstILfwloZUpRM7nsH7SVodb+j0oKjac/Z3Ot/ 2Xcwd788m62KzsRgwjAlWUtamLhrn51vapWqVCVKfWao9nHfoLQ5oDn2rITj5v/rYypC As3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=STn+xmbi; dkim=neutral (no key) header.i=@suse.cz header.b=SuyCQFom; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a50c88b000000b004575571fbc6si7386110edh.321.2022.09.29.05.02.59; Thu, 29 Sep 2022 05:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=STn+xmbi; dkim=neutral (no key) header.i=@suse.cz header.b=SuyCQFom; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234574AbiI2LSi (ORCPT + 99 others); Thu, 29 Sep 2022 07:18:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234798AbiI2LSa (ORCPT ); Thu, 29 Sep 2022 07:18:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15DE613E7F6 for ; Thu, 29 Sep 2022 04:18:28 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 900C21F8AC; Thu, 29 Sep 2022 11:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664450306; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=urbGd3LAjOpWbVvqm9mfXm+G/l17iKcXVGqxKpMeX5Q=; b=STn+xmbiPxhW9r5zgAt4bVEVNMMc6jd8rXGxswLPtnG5S2JBWy+cHnwGMBxW3BMNKCorOe YPkVb/Na44IdzaxsKDPsDLGNiqHjN7SMN600D2Yqjcqw4ds9zwz8aa4vFJb6qPzIMAx4M8 17ZMI733Payhh1jz/YlaxJYfEKQuciQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664450306; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=urbGd3LAjOpWbVvqm9mfXm+G/l17iKcXVGqxKpMeX5Q=; b=SuyCQFompQd0ZYx14elDUVk3xibRIRatzprS4Kx0v/d0SRop9JvAWHCXFnZb057DzgPIfa rxqwRV1K/SGhTACg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 34C991348E; Thu, 29 Sep 2022 11:18:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id s8pSDAJ/NWMiagAAMHmgww (envelope-from ); Thu, 29 Sep 2022 11:18:26 +0000 Message-ID: <621612d7-c537-3971-9520-a3dec7b43cb4@suse.cz> Date: Thu, 29 Sep 2022 13:18:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [RFC PATCH RESEND 00/28] per-VMA locks proposal Content-Language: en-US To: Suren Baghdasaryan Cc: Kent Overstreet , Andrew Morton , Michel Lespinasse , Jerome Glisse , Michal Hocko , Johannes Weiner , Mel Gorman , Davidlohr Bueso , Matthew Wilcox , "Liam R. Howlett" , Peter Zijlstra , Laurent Dufour , Laurent Dufour , "Paul E . McKenney" , Andy Lutomirski , Song Liu , Peter Xu , David Hildenbrand , dhowells@redhat.com, Hugh Dickins , Sebastian Andrzej Siewior , David Rientjes , Axel Rasmussen , Joel Fernandes , Minchan Kim , kernel-team , linux-mm , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, LKML References: <20220901173516.702122-1-surenb@google.com> <20220901205819.emxnnschszqv4ahy@moria.home.lan> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/28/22 04:28, Suren Baghdasaryan wrote: > On Sun, Sep 11, 2022 at 2:35 AM Vlastimil Babka wrote: >> >> On 9/2/22 01:26, Suren Baghdasaryan wrote: >> > >> >> >> >> Two complaints so far: >> >> - I don't like the vma_mark_locked() name. To me it says that the caller >> >> already took or is taking the lock and this function is just marking that >> >> we're holding the lock, but it's really taking a different type of lock. But >> >> this function can block, it really is taking a lock, so it should say that. >> >> >> >> This is AFAIK a new concept, not sure I'm going to have anything good either, >> >> but perhaps vma_lock_multiple()? >> > >> > I'm open to name suggestions but vma_lock_multiple() is a bit >> > confusing to me. Will wait for more suggestions. >> >> Well, it does act like a vma_write_lock(), no? So why not that name. The >> checking function for it is even called vma_assert_write_locked(). >> >> We just don't provide a single vma_write_unlock(), but a >> vma_mark_unlocked_all(), that could be instead named e.g. >> vma_write_unlock_all(). >> But it's called on a mm, so maybe e.g. mm_vma_write_unlock_all()? > > Thank you for your suggestions, Vlastimil! vma_write_lock() sounds > good to me. For vma_mark_unlocked_all() replacement, I would prefer > vma_write_unlock_all() which keeps the vma_write_XXX naming pattern to OK. > indicate that these are operating on the same locks. If the fact that > it accepts mm_struct as a parameter is an issue then maybe > vma_write_unlock_mm() ? Sounds good! >> >>