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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8F1DC433EF for ; Sat, 21 May 2022 20:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243003AbiEUUWS (ORCPT ); Sat, 21 May 2022 16:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbiEUUWO (ORCPT ); Sat, 21 May 2022 16:22:14 -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 B9FE543387 for ; Sat, 21 May 2022 13:22:13 -0700 (PDT) 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-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-53-phPbjI9HNQmi4CJKc9rd9Q-1; Sat, 21 May 2022 16:22:10 -0400 X-MC-Unique: phPbjI9HNQmi4CJKc9rd9Q-1 Received: by mail-ed1-f71.google.com with SMTP id q12-20020a056402040c00b0042a84f9939dso7889724edv.7 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=LA2LZ4jXROgaLgTOft/zo3YMacqwbuEfMtO3S4CF2aAFpfme4hYTPr7QD1ybRDt5eg QvBxo8lmpG11MgRsSO9nlUPVo0VfqaBTaUS/LjJz2r5FDWhgl96i5Iny70UP+h5uPgmd 0bPjAedG/nBBdxInHwp0RLBCDRbai6F2vzOLxY/fOvmffaCN1KBiLmm8eJTmayGFX2xC 01nJw/85OLvFCzhcGfOiROEs4W25vezLwMZn9hw97y23/MIwjMvEfGgkuqPDr0EwLNVx Q5unSSDUxf3PPZPiUjzGoUx9bgyjDjgUEsiyNCAPISq00zAimsT3WClAnKc4wOgybDFn qgUA== X-Gm-Message-State: AOAM531tTMaRN+Nz6Xm9NlEqX9xmeVPStB76u70uEofPzsX7IenLc/TI xR9b2jVSfYyeu0skpLu0BupBg3KdWVF/yEaH8SrktZgj7YXiC8rWiF2HMD9dHfEqrT/7f31a0f6 O+gWKkIklGtJNSoljRacvXjPx X-Received: by 2002:a17:907:a089:b0:6f4:a99c:8e05 with SMTP id hu9-20020a170907a08900b006f4a99c8e05mr14309549ejc.31.1653164529435; 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 Content-Language: en-US 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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