From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FFAEC433DB for ; Tue, 2 Feb 2021 17:18:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3AB4164F87 for ; Tue, 2 Feb 2021 17:18:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AB4164F87 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C39126B0073; Tue, 2 Feb 2021 12:18:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BEA006B0075; Tue, 2 Feb 2021 12:18:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B01F86B007B; Tue, 2 Feb 2021 12:18:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9812F6B0073 for ; Tue, 2 Feb 2021 12:18:06 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9E85C362E for ; Tue, 2 Feb 2021 17:18:04 +0000 (UTC) X-FDA: 77773985688.18.mark65_0d12933275cc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id C61B410048BAF for ; Tue, 2 Feb 2021 17:13:30 +0000 (UTC) X-HE-Tag: mark65_0d12933275cc X-Filterd-Recvd-Size: 4497 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 17:13:29 +0000 (UTC) Received: by mail-qv1-f52.google.com with SMTP id j4so10232071qvk.6 for ; Tue, 02 Feb 2021 09:13:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=v2kYB3a8N+U6pJPO13PFP2mzAbH5g3SIInxbpBCXrwA=; b=Lwi+XbDCr6TCrZEfpzQKqD6YwszIXqYUbUeJZN60nrjvPZkfnT7iVB6KJ1vo4MF/Ju BZzirkaxpCMJLL1xX+ftJ34uLSaX5K/55x8NaDotG8vl2yecqSXSshokgGwBQuaBJ1yA jovx7euuIa8/vBcU9r1Stobl1uBJHPyPH+4GqBdW1njAEd+BHvopKwNLYeohLA0biKn5 jQ9dSYghv+4HZ7Kd44JQxkKD80YfJ5VZn2hfzsFcGzlv+V78TujbN0Ue7NkZmkuLES5M QQR6WZJm+t+LWWVARCxhWDEztR49U47UGHBPRNBZ48YlVTfFv84r6G/EUfsq9F0th5Dr fpxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=v2kYB3a8N+U6pJPO13PFP2mzAbH5g3SIInxbpBCXrwA=; b=Gb0bCOkUqzFAQIuBFE9P6WrNckwTIUhWGhNPq7h+FAgkidon+1Bdbi/lHXAH/ESQTr ys7h0DWntsyALsXSpuaQFSwimf5pc4HGweOeyyMDqJ9I0HFgRoB+n4C0VYfEswgygUwy NBOEF9fgru7BDKgAGeUUyk89CXo20XIB6a5sXEr/LMtM60K5bVezUcYgRbqMRaXcS+mh uUyA8BZeM2GsR7wUp2c3WuyeDmq8pkKRMc3QutDjpyn68KjnW8wL8T6Czm9Bjo7ngkuF 9eAtBlSLQ7me3ihaLpAODX2y1765pbe6dmJ45H3AS5q9KmUblY9JGnO/aclnkEN6TJv+ LbxA== X-Gm-Message-State: AOAM5322tFJNZ5/4tDHBsnh5D6Zi+jZwDCe8IojYE3HbEV+PJ+qLUQCK mOlGXtAsae7mUw2YlhTjZ0shSQ== X-Google-Smtp-Source: ABdhPJytq6oFwGR7z/VXKwcEPeyLad3Giz139CxUfM41nvnIvBbiNtEKgEhOj/c8qwXZly87/hhlVg== X-Received: by 2002:a05:6214:32e:: with SMTP id j14mr21389150qvu.13.1612286009003; Tue, 02 Feb 2021 09:13:29 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id x49sm17798341qth.95.2021.02.02.09.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:13:28 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l6zF1-002cUu-Ek; Tue, 02 Feb 2021 13:13:27 -0400 Date: Tue, 2 Feb 2021 13:13:27 -0400 From: Jason Gunthorpe To: Peter Xu Cc: 20200918161902.GX8409@ziepe.ca, Linus Torvalds , John Hubbard , Leon Romanovsky , Linux-MM , Linux Kernel Mailing List , "Maya B . Gokhale" , Yang Shi , Marty Mcfadden , Kirill Shutemov , Oleg Nesterov , Jann Horn , Jan Kara , Kirill Tkhai , Andrea Arcangeli , Christoph Hellwig , Andrew Morton , "Zhang, Wei" Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification Message-ID: <20210202171327.GN4718@ziepe.ca> References: <27564187-4a08-f187-5a84-3df50009f6ca@amazon.com> <20210202163127.GD6468@xz-x1> <20210202164420.GL4718@ziepe.ca> <20210202170536.GE6468@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210202170536.GE6468@xz-x1> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 02, 2021 at 12:05:36PM -0500, Peter Xu wrote: > > Gal, you could also MADV_DONTFORK this range if you are explicitly > > allocating them via special mmap. > > Yeah I wanted to mention this one too but I just forgot when reply: the issue > thread previously pasted smells like some people would like to drop > MADV_DONTFORK, but if it's able to still be applied I don't know why > not.. I want to drop the MADV_DONTFORK for dynamic data memory allocated by the application layers (eg with malloc) without knowledge of how they will be used. This case is a buffer internal to the communication system that we know at allocation time how it will be used; so an explicit, deliberate, MADV_DONTFORK is fine Jason