Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2094871ybb; Thu, 26 Mar 2020 21:50:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtp47aPG4RsZcyEk6utN2Q6hdAxEm/jN14Jj2RThQ+6baFYCPZJunoe1O473zF0Amnnegf9 X-Received: by 2002:a05:6830:1413:: with SMTP id v19mr1997559otp.41.1585284635538; Thu, 26 Mar 2020 21:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585284635; cv=none; d=google.com; s=arc-20160816; b=EEnzij/wHEQMMLMI1k35F6xFjl63LvL+HgXO2e0GTMm0Zhl2fF35G4JtrMgrEVtzWX Sl+RTvdQeOerlyhF0JQttOAz1dOSn9PGH4tWIO1fJa6arVPHXEZ9r9B07Emr/ImSMk0Y U1faWr2cifzwvhZi3Yuy2jpqIkgSzdnCEMcyhJJbXPFZX9aDBExgmFT+xEgu3kAmMVsS +i02t+3JQae/v8808hg6CpEgq2eoZM0VLXlsDVZ6ce+aMcPgXdJ8zjPNKLq9O6YUWD/S g+hRmx7XwcqUGag4EQNtbhT7wb6SxTsRI4eZzW9oMOarbtYF2/88bpTJIgMzUaPAr14v 8mgg== 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:mail-followup-to :message-id:subject:cc:to:from:date; bh=oRSTovwhhcYnxnaClB1JzuQk+m1y6Q1oyq9GPllt5aU=; b=LTOWMZMcUET2Zx2EzqD9IJE0EtYKk2yokVkueW1gM0k/3QSJyUH3PF4PCfr87tXWTf HiIa+PHENMK9bqafJ9PF07WWXFBnmSJvHkS3efDWODH29Fc99i0O2lZ75yMT2UJ/yo20 KLbmc/dMisC6tkWV4BPDDmu62cceSDpv+ZKrRbH9I3+9A0aVlPCF7mTbTd5Eup6AjYwO 1pyb6jQoRt+3P8vgufeJp/FfiDRWOUkwnXlWp6Qk6XlvPXH8NmOSkpRyMuwXIovatd5w I5o6BWbizZQ5dBLZtpDAMGwGx28aIzrKxnmJARmGCEoSN86Q92RVG82rB6WlkXL6GWwI qvPA== 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 r24si1773987otp.264.2020.03.26.21.50.22; Thu, 26 Mar 2020 21:50:35 -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 S1726661AbgC0Esb (ORCPT + 99 others); Fri, 27 Mar 2020 00:48:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:47186 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbgC0Esb (ORCPT ); Fri, 27 Mar 2020 00:48:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 033EFAE87; Fri, 27 Mar 2020 04:48:29 +0000 (UTC) Date: Thu, 26 Mar 2020 21:46:47 -0700 From: Davidlohr Bueso To: Michel Lespinasse Cc: Andrew Morton , linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Markus Elfring Subject: Re: [PATCH v2 07/10] mmap locking API: add mmap_read_release() and mmap_read_unlock_non_owner() Message-ID: <20200327044647.wgfsmjy37n72dixe@linux-p48b> Mail-Followup-To: Michel Lespinasse , Andrew Morton , linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Markus Elfring References: <20200327021058.221911-1-walken@google.com> <20200327021058.221911-8-walken@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200327021058.221911-8-walken@google.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Mar 2020, Michel Lespinasse wrote: >Add a couple APIs to allow splitting mmap_read_unlock() into two calls: >- mmap_read_release(), called by the task that had taken the mmap lock; >- mmap_read_unlock_non_owner(), called from a work queue. > >These apis are used by kernel/bpf/stackmap.c only. I'm not crazy about the idea generalizing such calls into an mm api. We try to stay away from non-owner semantics in locking - granted the IS_ENABLED(CONFIG_PREEMPT_RT) warning, but still. Could this give future users the wrong impression? What about just using rwsem calls directly in bpf? Thanks, Davidlohr