Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2615707ybk; Mon, 18 May 2020 03:45:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOGGk58gk5G9knyK1iR8Hrk7nhA07b+GpvId/Qw8JJqeFOWKqVC4vQeYsqQ1H//8W3tNo3 X-Received: by 2002:a17:906:560b:: with SMTP id f11mr13423185ejq.264.1589798713875; Mon, 18 May 2020 03:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589798713; cv=none; d=google.com; s=arc-20160816; b=TMTisPGexfZSpJNue/ocWtUfqq5VpxADt9DzwDUOQechXUVH8Y2RWQZ7jF/SS0qyAy 9icw1beyDAuMxhmTr693vTEkF3wUYgdqoTqC0TOoGhGU4RCPcY4cJWd9GtSAyiAm8XKz 7Wzo9WXdB9IBRLpBITRsVCDXxKZSbfHq4Vc7b8ujn+oH5MXjkEP8itWzhkLwqRwikGIN wyX3zTaQfeKpex6Smzrsli8FCvn+INGSJHZxxf8Ipd4ObENwiPWfP/sptwUiRjUtrHvV LQLOU6Gvn/5DmI4AridGJ89345CqC7iZea9e/n5DsBSv6/wodVXPk9FTrBqw/vkI7r4J zS3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=auox35qkemqutC4DdkHYEsfqa0PJTKTWEiTDD1a6FGU=; b=0R8C5qsTW5xbCunLKzJ3ho3wXjBiU7dw1UgZa1VqTJH4SGhXWbaUl9cJJP7fkHEuk3 OuUUV3cyL01Z/ANTrq46Pz+gSm8z/Q8/lqmrwAmcOJr3GeB7YUM6BuWv18P9eMafIitJ EpU9P6QC5pajeFGe6ZrjFJMFDWio6TixYxsjN5tl7GEP5zWNptlHJgSBTsYROSreJzrB 6Vted5XtcBOV6+OBquDPmqDUoBJTRG/1bbii/zPJMe3KjuMNSsiVKSIuRNpN+td0IUlL wNq2+xZSFpviSAVnhiyNDlkXZxGHticrE4VxlEdZRfmUjOhvWNYCwfCIvr7HknYC895+ 09Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si6067785eje.111.2020.05.18.03.44.50; Mon, 18 May 2020 03:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726374AbgERKmx (ORCPT + 99 others); Mon, 18 May 2020 06:42:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:33096 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbgERKmx (ORCPT ); Mon, 18 May 2020 06:42:53 -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 7C680AA4F; Mon, 18 May 2020 10:42:54 +0000 (UTC) Subject: Re: [PATCH v5 07/10] mmap locking API: add mmap_read_trylock_non_owner() To: Michel Lespinasse , Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-8-walken@google.com> From: Vlastimil Babka Message-ID: Date: Mon, 18 May 2020 12:42:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200422001422.232330-8-walken@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/20 2:14 AM, Michel Lespinasse wrote: > Add a couple APIs used by kernel/bpf/stackmap.c only: > - mmap_read_trylock_non_owner() > - mmap_read_unlock_non_owner() (may be called from a work queue). > > It's still not ideal that bpf/stackmap subverts the lock ownership > in this way. Thanks to Peter Zijlstra for suggesting this API as the > least-ugly way of addressing this in the short term. > > Signed-off-by: Michel Lespinasse > Reviewed-by: Daniel Jordan Ugh... oh well. Reviewed-by: Vlastimil Babka