Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp319405ybr; Fri, 22 May 2020 07:26:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDhcQCR6IWy8OP8xgnD1BMspXbDLTR6VMWn9Y5eLntdzen4qXxGWcIcGvjhqb3l1vKaeK4 X-Received: by 2002:a17:906:498a:: with SMTP id p10mr8712848eju.163.1590157580833; Fri, 22 May 2020 07:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590157580; cv=none; d=google.com; s=arc-20160816; b=jC3ALDaoKmgZdPr+BVBc9wN5SoTty5zVGDlNU1MUpI72bT7WHXrxPzDNBEESRNv1Qz CXkSzi0nCE7yh3sfvA3Lat3ryuphyU6S3LUVw8X6e7p/RYbBLxu1yDMKIVGepNVnBQe7 i2taQEjirNLxlBqC0JWeLFo7HTdrAU1Lr8aUF019bZe9GU6D+tl0xu+lCq/xDXqt0xTF QxhZD9HaG6UvKZJoOf9PHIbyw8osPNEUdxf6hes169gInn5wUH8DaINYV//GBphS9WrD GEfLpaUNo2aeAkrVnP5rkfSn2z0h4HkvGtN2xMh5K6YiUdgHy6G0qiQ/maVk3t3Tq8bQ 2OWA== 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=VwGPsF6MmB4IvtZ7KDOMzoTBBnS+qdZi0nAXA55zLfk=; b=Xz/MzHP1QY5vihALCSfYa30rf2FW6Vxq5OTcsSEFVs306yZEoTAwh2w20mO7mxFow+ IHcWeJuf/P1tzh15sa7n6JtwH5nHXJ4KsIxrFRu+RqcKBIq38Cd6WVWkXw0klPmH05Ac xJaIKYi6eHrlrgkPkfCheoypmae7MOSmJi+kGhFbMucRWJSCEJkQIYO6nRMcR0yc883u PYDQ/JaJPubnmzt0e1Kd1cSAg4rckRYj2nxHyH0VGvt4Ttv5m44StFEqaOAtfp7QPwrx ZKxKRsdzNwfuvnftc/5/MOf9GYWRNWWYoxukOcPxepbVucpLs3z9K4RhMrYz12MS0n87 MqTg== 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 n2si4781587ejc.110.2020.05.22.07.25.57; Fri, 22 May 2020 07:26:20 -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 S1730096AbgEVOWA (ORCPT + 99 others); Fri, 22 May 2020 10:22:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:59938 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729399AbgEVOV7 (ORCPT ); Fri, 22 May 2020 10:21:59 -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 EC6FAAD12; Fri, 22 May 2020 14:22:00 +0000 (UTC) Subject: Re: [PATCH v6 12/12] mmap locking API: convert mmap_sem comments To: Andrew Morton , Michel Lespinasse Cc: linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan , John Hubbard References: <20200520052908.204642-1-walken@google.com> <20200520052908.204642-13-walken@google.com> <20200521102516.01dbc9fcc539baba96224c3f@linux-foundation.org> From: Vlastimil Babka Message-ID: <9858cd98-b303-beb4-82f6-52f902f98772@suse.cz> Date: Fri, 22 May 2020 16:21:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200521102516.01dbc9fcc539baba96224c3f@linux-foundation.org> 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 5/21/20 7:25 PM, Andrew Morton wrote: > On Thu, 21 May 2020 00:50:56 -0700 Michel Lespinasse wrote: > >> > > * Must be called holding task's alloc_lock to protect task's mems_allowed >> > > - * and mempolicy. May also be called holding the mmap_semaphore for write. >> > > + * and mempolicy. May also be called holding the mmap_lockaphore for write. >> > > */ >> > > static int mpol_set_nodemask(struct mempolicy *pol, >> > > const nodemask_t *nodes, struct nodemask_scratch *nsc) >> > >> > :) >> >> Haha, good catch ! > > aww, you're all so cruel. The world would be a better place if Linux > had lockaphores! Heh, in fact it does have them, but they are called "btrfs extent buffer locks", see (or perhaps rather not) fs/btrfs/locking.c :)