Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp353376imn; Thu, 28 Jul 2022 02:44:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vC0dgFp/VoDwnfPzEd4E9wR1pBmb7iE/Z/YeScqd5OuVmpyTo/dxybNweLU1ulp/IJiCZF X-Received: by 2002:a17:906:4fc3:b0:72e:eab4:d9d7 with SMTP id i3-20020a1709064fc300b0072eeab4d9d7mr20389799ejw.599.1659001483692; Thu, 28 Jul 2022 02:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659001483; cv=none; d=google.com; s=arc-20160816; b=OlYVSm5dYykwiuE+p/VY1N2J8EYYDSNya6gckKDw/3PbHZQsCfhiL8vhvkGJiNwHZ8 AjQ4SWPhUR5eOgstzcG2lbPtz2D72eUyJt1vS3cjYhXuVxkJt6pdrTw2Uurppms1e9ov 6GY7J0b+xJhId2/6wye1vl+ivTLRNnSuDhvL91VsaOU7YT7k9o0KmJONq10HSPSzk8il tHSFSO0cikRW89Xbht+e6LkqY1BYpK6xGyxzjsF2JecStgdGPXCbq0a3qTAx4hFSFyW8 ko5OYi1ggBYXWncFHv77c5Qfjr93jTw1aSPVU3hv79IQ7zeKn55ZNY7kMPTgr+23sehW XYcA== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=MUUHnK3mGjBTIixFdMqpioqDxoaunFSmdGJUDWVh8gY=; b=Paj96IXw900CwJ1gp1zG3dixp/VuvlbDT2m6g+kkd+yd+2JB1xkvgzLf+9akM2QO/P V6Du0FmXT+XciV1Khtz/JoX8Kv84tcNQpuhi8byIpYKrIpDpy1FwyHh1KLd3BLx+wl8V CnsUOJ+GSxcj1bBfgYBGnxi0HUTlsCxZhF8xBtYydtzFjbPsjDJlVSeZCtBDKWbfoKi+ 5688YCSt58MGr+r/gbKxJ+txECLLyfSUllZLW7sDkE2UTvVWxLk8NpWBFtCacH7p6BgO LcNoF6UezKKaYSccOQ6LSfRVxwbdnon/i2RTK82zsSLKdiw93jcQJP0d4C4RkWMXKNv2 oEfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fy1hI5tS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv13-20020a17090760cd00b0072b4b0b6908si367921ejc.892.2022.07.28.02.44.19; Thu, 28 Jul 2022 02:44:43 -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=@redhat.com header.s=mimecast20190719 header.b=fy1hI5tS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235412AbiG1JXm (ORCPT + 99 others); Thu, 28 Jul 2022 05:23:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234026AbiG1JXk (ORCPT ); Thu, 28 Jul 2022 05:23:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 50E476566A for ; Thu, 28 Jul 2022 02:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659000217; h=from:from:reply-to:subject:subject: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=MUUHnK3mGjBTIixFdMqpioqDxoaunFSmdGJUDWVh8gY=; b=fy1hI5tSguC+KnHazRGc9PMlA76Hnp/gem56+vEykEjR6jl0qyZSW6nOdffaHoiHUmYlkJ CnYIJQVVzo5eOo0Yuvj4r4QE688Vto0tsyzpx9iBmzmAsfrVtOqTvGaW0WK2OW12wjv4+Q FhnQAVt3HCmWULavUgBkvUheA+e+238= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-tAaXZ2XBPQa1vbNrIsQVkw-1; Thu, 28 Jul 2022 05:23:35 -0400 X-MC-Unique: tAaXZ2XBPQa1vbNrIsQVkw-1 Received: by mail-wm1-f70.google.com with SMTP id n19-20020a05600c3b9300b003a314062cf4so2367197wms.0 for ; Thu, 28 Jul 2022 02:23:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=MUUHnK3mGjBTIixFdMqpioqDxoaunFSmdGJUDWVh8gY=; b=L9xo3ADhYs8wYfTYicGrsKgoKkZSYn6F/F19E4N9lQvRNuqmRVNuSqONpqZ+0eIbcB XptMdl9vbFoEQ8rGlU6V6fJRSWu+s6KAHoqq5qxv5W9FrSQQ9D280+h+fJvZ9zDAeSaD KRU+9736E5IFFuAoQodjji4Hr8oinlsP5N9o+/RM35jSX293Zb59bWH0Wgj+KJCH3W9e pNfVazMzdJoOfgTxyntx12mXjZvIxOIpt/uMccQnk0LN9q2zNDNeZtzxTqEBB8vkYT53 iZGKS6qtVzjkhr5C4jnniDrlqPs2Tids8zIwjduOsoBmPCFsWlidmW1VCgHKjgzjzrLk fqnw== X-Gm-Message-State: AJIora9wKLZ8NPKM7xXc8uCLT2e8KiHcyTURYG+hdluj05ped3j4kJAM LzKGc8DnBOdJjAE5jiuUbHTyWVOO5Ctk7bayYfzg229NeVM0reIVOYPMLrf42h48LfMnymG4UvU Y9Iwndbb1jy/oqBtzDuxFKaaL X-Received: by 2002:a05:600c:3510:b0:3a3:34e7:cfc8 with SMTP id h16-20020a05600c351000b003a334e7cfc8mr6168706wmq.164.1659000214724; Thu, 28 Jul 2022 02:23:34 -0700 (PDT) X-Received: by 2002:a05:600c:3510:b0:3a3:34e7:cfc8 with SMTP id h16-20020a05600c351000b003a334e7cfc8mr6168689wmq.164.1659000214387; Thu, 28 Jul 2022 02:23:34 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:7b00:9c4:744b:b126:3a28? (p200300cbc7047b0009c4744bb1263a28.dip0.t-ipconnect.de. [2003:cb:c704:7b00:9c4:744b:b126:3a28]) by smtp.gmail.com with ESMTPSA id w13-20020adfee4d000000b0021f0af83142sm254643wro.91.2022.07.28.02.23.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Jul 2022 02:23:33 -0700 (PDT) Message-ID: <6492e852-8acf-95a9-a3a0-8ce8bbaf46d6@redhat.com> Date: Thu, 28 Jul 2022 11:23:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] mm: Re-allow pinning of zero pfns Content-Language: en-US To: Alistair Popple , Jason Gunthorpe Cc: Alex Williamson , akpm@linux-foundation.org, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, paulmck@kernel.org, jhubbard@nvidia.com, joaodias@google.com References: <165490039431.944052.12458624139225785964.stgit@omen> <20220615155659.GA7684@nvidia.com> <20220623142139.462a0841.alex.williamson@redhat.com> <20220623204712.GG4147@nvidia.com> <87a6a2zyxk.fsf@nvdebian.thelocal> <20220624013415.GI4147@nvidia.com> <874k0ax1s0.fsf@nvdebian.thelocal> <878rodvcty.fsf@nvdebian.thelocal> From: David Hildenbrand Organization: Red Hat In-Reply-To: <878rodvcty.fsf@nvdebian.thelocal> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 28.07.22 10:45, Alistair Popple wrote: > > Looks like the original patch might need rebasing. I am about to post a > clean-up for the tortured logic in check_and_migrate_movable_pages() so > can incorporate it there, but I'm wondering what the consensus was for > pinning of zero pfn? We have to keep it working right now, but in most cases (inside MAP_PRIVATE regions) it's shaky and undesired. > > Currently my clean-up will result in PUP returning an error for the zero > pfn rather than looping indefinitely in the kernel. However it wasn't > clear from this thread if returning an error is ok, or if R/O pinning > of the zero pfn should succeed? I'm working on proper COW breaking in MAP_PRIVATE mappings, which will, for example, unshare the shared zeropage and properly replace it by exclusive anon pages first in the FOLL_LONGTERM case. -- Thanks, David / dhildenb