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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B08EC433EF for ; Sat, 21 May 2022 20:22:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D957A6B0072; Sat, 21 May 2022 16:22:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D46066B0073; Sat, 21 May 2022 16:22:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C348E6B0074; Sat, 21 May 2022 16:22:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B53B36B0072 for ; Sat, 21 May 2022 16:22:17 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8B01632E8A for ; Sat, 21 May 2022 20:22:17 +0000 (UTC) X-FDA: 79490872314.06.5DCC91B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id CF04E1A0017 for ; Sat, 21 May 2022 20:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653164532; 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=7aIzRedNQK/WjAi9cIve+iXVnAR7Rs9ezkXRqJAQ8qc=; b=aCh//TtF8oJIc341nNQxMtrccLZl5a4lc2t7EW8oO+SsDcwHwQTQe0IdDaHqJ1E8ratLmw fX5J01uXeYMBrFD2e9IxziKwj4N0TtSsTwfCvphV56ffmh8qpf6EmPiq9sWBf6BHKCrLTM KF1vSTj2Lt+/6twz7iBBwhGl5ZWPRGE= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-577-euQQm5fHNcGYbx19v5JrBg-1; Sat, 21 May 2022 16:22:10 -0400 X-MC-Unique: euQQm5fHNcGYbx19v5JrBg-1 Received: by mail-ed1-f72.google.com with SMTP id g10-20020a056402180a00b0042ab515d6c5so7798579edy.13 for ; Sat, 21 May 2022 13:22:10 -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 :content-language:to:cc:references:from:organization:subject :in-reply-to:content-transfer-encoding; bh=7aIzRedNQK/WjAi9cIve+iXVnAR7Rs9ezkXRqJAQ8qc=; b=qDSeXnUyWmQMPllnLDd1r/UBkb2jnEw/b8mnKXIfitcdU8UkeZzKDsxeFUrn2D4um/ v6DKfkF+wps54pd5IwnZUH+LYpMi7Wd8LEV3wyIAi02CRxlB2DvURxayHcnwP6s38LTO 49Sytm0SmG0VXE2WKoVTrNrJBN1Csk8+lE5i+7WyB/2L3XcXsh/oEvxv45Aaei64fpb/ jMZvAFwL4i7qMbrT2OjkuzOO6p/SMB20UjyC+NBvLgfD01DgAW31XDZD0SLP7eU9csbT 2SjDG5lYWhCe9kRkZvnk/b7+qm0nHL4nClnVHVONHfyxI9eQz0W6xKjBU9McSCdiMbg6 FlcA== X-Gm-Message-State: AOAM5334eG57Do3w/Pzg0ta4e4b+FhrsfrqBRXwxlbeHYckHci7SDbHt I1CoETva4rzKwOk6/b8ib9MLVYFy4hJPK813rM2npVBibCR2bfbIZ80jCcCbf1UfiSHMjQl+cKM 3PhT5nImpYW0= X-Received: by 2002:a17:907:a089:b0:6f4:a99c:8e05 with SMTP id hu9-20020a170907a08900b006f4a99c8e05mr14309581ejc.31.1653164529463; Sat, 21 May 2022 13:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyj3lqwcJp5KL/sjnqTb4CYPqgoWP4iV9pJIdgaSMkNYgM6HoNUcTjp/+fvkTPJoCVpPLJmTg== X-Received: by 2002:a17:907:a089:b0:6f4:a99c:8e05 with SMTP id hu9-20020a170907a08900b006f4a99c8e05mr14309532ejc.31.1653164529178; Sat, 21 May 2022 13:22:09 -0700 (PDT) Received: from [172.29.4.249] ([45.90.93.190]) by smtp.gmail.com with ESMTPSA id w9-20020aa7d289000000b0042ae2d4e2f2sm5921129edq.86.2022.05.21.13.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 May 2022 13:22:08 -0700 (PDT) Message-ID: Date: Sat, 21 May 2022 22:22:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 To: Matthew Wilcox Cc: Chih-En Lin , Andrew Morton , linux-mm@kvack.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Christian Brauner , Vlastimil Babka , William Kucharski , John Hubbard , Yunsheng Lin , Arnd Bergmann , Suren Baghdasaryan , Colin Cross , Feng Tang , "Eric W. Biederman" , Mike Rapoport , Geert Uytterhoeven , Anshuman Khandual , "Aneesh Kumar K.V" , Daniel Axtens , Jonathan Marek , Christophe Leroy , Pasha Tatashin , Peter Xu , Andrea Arcangeli , Thomas Gleixner , Andy Lutomirski , Sebastian Andrzej Siewior , Fenghua Yu , linux-kernel@vger.kernel.org, Kaiyang Zhao , Huichun Feng , Jim Huang References: <20220519183127.3909598-1-shiyn.lin@gmail.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [RFC PATCH 0/6] Introduce Copy-On-Write to Page Table In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CF04E1A0017 X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="aCh//TtF"; spf=none (imf19.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: 9ueux3t1ehtb8sur6jutsgxh48yhxfcq X-HE-Tag: 1653164524-486857 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 21.05.22 22:12, Matthew Wilcox wrote: > On Sat, May 21, 2022 at 06:07:27PM +0200, David Hildenbrand wrote: >> I'm missing the most important point: why do we care and why should we >> care to make our COW/fork implementation even more complicated? >> >> Yes, we might save some page tables and we might reduce the fork() time, >> however, which specific workload really benefits from this and why do we >> really care about that workload? Without even hearing about an example >> user in this cover letter (unless I missed it), I naturally wonder about >> relevance in practice. > > As I get older (and crankier), I get less convinced that fork() is > really the right solution for implementing system(). Heh, I couldn't agree more. IMHO, fork() is mostly a blast from the past. There *are* still a lot of user and there are a couple of sane use cases. Consequently, I am not convinced that it is something to optimize for, especially if it adds additional complexity. For the use case of snapshotting, we have better mechanisms nowadays (uffd-wp) that avoid messing with copying address spaces. Calling fork()/system() from a big, performance-sensitive process is usually a bad idea. Note: there is an (for me) interesting paper about this topic from 2019 ("A fork() in the road"), although it might be a bit biased coming from Microsoft research :). It comes to a similar conclusion regarding fork and how it should or shouldn't dictate our OS design. [1] https://www.microsoft.com/en-us/research/publication/a-fork-in-the-road/ -- Thanks, David / dhildenb