Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp477932yba; Wed, 15 May 2019 04:51:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz79tQNxkzr1G9oyVmCbM2fou4qfcI5VE2OQLpK6NNWpyLNjXN59kOFphcZwUvwHsHu53LZ X-Received: by 2002:a17:902:22f:: with SMTP id 44mr42640322plc.175.1557921096587; Wed, 15 May 2019 04:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557921096; cv=none; d=google.com; s=arc-20160816; b=s37mZq6VHhaLoETeFRge/gviYGGCU0OJi36aBVpRUN65doGVCErRFULTWxUROgPyI5 z6G1ehbX3UUTkKlfE7ok9yhjc+H+Dq/04l+ulolblGseN3r6ANH1cORZAxoBLMSKIhcZ jyzHtvnX61IkemGMrLLr9zUTOP2uc67jkGfqZq3RrJufXteIjyA6Yu5yY7JWO2BjfcHw CUadb3XDDyVR+bhI2gsDpI2WQHd9uFrj6OdVrxI8LbG5NeF7YgwBwcyyhjeoU6XHEwBj 6LmxeD+BbRNAIKEUp9kxAAs+CIiKlQ8KbNAN7QTiroqPzZRCRPCq3AYiYjnYMd/i6pIQ 77Ww== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mc63LhWg2+r8G6LyepIMoQgzu86nCTP3tUKDYnTysXo=; b=AFijtx2wdFj2BIjCjrZ+fWj86AS+2baJw4w6nOZGuDmgE8WYo8l8ltK3rmEfMfQhHa KIIWBo1owVE3Z2Pi40iPpAkCQbuRCj2FaYWDPgtIKmiXsyU22dsD6PGGjJkMKo4HXNol Gfi2qRGYPN2PVpaho9CuiWKG4DbipZPHZK4ogjqIYpUxi0XCh1ItHA0A8gJCHsSdLWEZ RsabP31WK5MS0dxyGLeUH+5t3t68yJa9NntR3bGwjUuYBxO8VdeltS7+Vo8Wj/nP+RiX TaQz4XRmP123BBuUPH7cGOfmPWRnnySdAklOzH5KogCcTHK3/D/CYRITmDfX4ECu9dBJ 1gqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NJTP+oeO; 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 g191si1652534pgc.197.2019.05.15.04.51.21; Wed, 15 May 2019 04:51:36 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NJTP+oeO; 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 S1731877AbfEOLuA (ORCPT + 99 others); Wed, 15 May 2019 07:50:00 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56240 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730379AbfEOLt7 (ORCPT ); Wed, 15 May 2019 07:49:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mc63LhWg2+r8G6LyepIMoQgzu86nCTP3tUKDYnTysXo=; b=NJTP+oeOJ2KTSYKFCNvyNdWTdl pkNAYs4PuM9AmwDSp+SRpJ2s5RQMLUOl+KvQeTbeCBBsWXMw//5EKv/S1ECv3NJFKztodOWSY+uLL x6LYCjisteMmKVkA80CIMjyz4BJLmCPomB9t/OOkhdsAJ/bWKo979xjvYWMODNwDryd1NyB1llGar THnvqn8pLDBzW6vZ4tX+ssfHbXZ49/xxkOo0JV+TI5LpknghfuJv6cbIJh7CPO5Lot3bObhMxV3Yt Fxo2c5686rUezL0nFqDfxSaVnWqnD555AqmYQNfVM1IDIDTE/CQfBBHzPVUdAf/CZJirFW1pVKzht Sl5ZZM5w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQsPy-0000MW-Qa; Wed, 15 May 2019 11:49:54 +0000 Date: Wed, 15 May 2019 04:49:54 -0700 From: Matthew Wilcox To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: khlebnikov@yandex-team.ru, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, oleg@redhat.com Subject: Re: mm: use down_read_killable for locking mmap_sem in access_remote_vm Message-ID: <20190515114954.GB31704@bombadil.infradead.org> References: <155790847881.2798.7160461383704600177.stgit@buzz> <20190515083825.GJ13687@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190515083825.GJ13687@blackbody.suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 10:38:26AM +0200, Michal Koutn? wrote: > Hi, > making this holder of mmap_sem killable was for the reasons of /proc/... > diagnostics was an idea I was pondeering too. However, I think the > approach of pretending we read 0 bytes is not correct. The API would IMO > need to be extended to allow pass a result such as EINTR to the end > caller. > Why do you think it's safe to return just 0? _killable_, not _interruptible_. The return value will never be seen by userspace because it's dead.