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.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 BF551C4727C for ; Fri, 25 Sep 2020 10:25:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6084B206C9 for ; Fri, 25 Sep 2020 10:25:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ms1CpZOJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6084B206C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D31426B0068; Fri, 25 Sep 2020 06:25:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE0A56B006C; Fri, 25 Sep 2020 06:25:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B80706B006E; Fri, 25 Sep 2020 06:25:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 9E2D36B0068 for ; Fri, 25 Sep 2020 06:25:36 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5033D180AD801 for ; Fri, 25 Sep 2020 10:25:36 +0000 (UTC) X-FDA: 77301202272.19.end96_36169ba27166 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 177311ACEAD for ; Fri, 25 Sep 2020 10:25:36 +0000 (UTC) X-HE-Tag: end96_36169ba27166 X-Filterd-Recvd-Size: 5272 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 25 Sep 2020 10:25:35 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id x69so2231694lff.3 for ; Fri, 25 Sep 2020 03:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EDTrxzVhPvirc6DaIwHmGU5btp2o0zUWFlr+hQsger8=; b=ms1CpZOJ8k6K5gNyl/8fgGKNeCIOwIQ6pwiWpuxuT4FKuzH19HH+sFPkj62fuhN6S8 1bYjfeiG+yABwHGPcSDZZcQTE/Hs/Ej+mdRY8mycu/fY5klH5FgWIjrbM80ENpCLbraC Vedu0Mi8Mxy2Dx5boaxsWDr0xpC8f24hu06JcS510dXmjVtUf4QajWz5bJt9qCrXEv/Y OnbNgPM5fTU/MMX8XsageCxcOINyk9fkC0cnqBEYKMvosHVqYpss0pIPOewyhP313C7g E/FNsmffN6gHhumCx/fQtrHeNfxxvOldTJALDAeOKKUfMEkQFGGS2hSuXr4o1tquOx6m We+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EDTrxzVhPvirc6DaIwHmGU5btp2o0zUWFlr+hQsger8=; b=D9kom1oxyA28eQrcj2dgyTZ2DC9gb32sgfE2cKSTnyjHKEnFTz/C+oTw97RWQYlLBP LulwV8/O6a/AiK1xfRtIBfN+TVaTS8LdCVvMClTVZNVtdBYRMn3aCPXvFB51c733UuwZ 90GQr1JkPGRuaDui1Zwit7A0JEoTdXgdIn/dUmOCVSahmr5vwbv1U2Brewlp2w2kE2Ne H5TgJ1Bm5rhmpOANPkmh2xxDGwZvVaoxEGSnsmkh4zJDtkReSgp6SSZqY59Qw90kuZch fpGmLHIvRzxPWmxJbDNwUIU6mh1Yc8VCYCE5uF6DNKah7Ue+tGOcGRTQVyHSzpy4PYdu DVjg== X-Gm-Message-State: AOAM532xBWgtX5ImICtT7SF0AEWp7PmPAcQqZEQk8It8aqN+QlZoCPxU /FkEmZfwqPnopUskcrBgvGE= X-Google-Smtp-Source: ABdhPJzc9jnAUHPreS882WLX0Hodi6O0tyUX+gJK+AO2qpK1Qn4CqGyCxv/4MCfXJNOEbGTn6T0crg== X-Received: by 2002:a19:8542:: with SMTP id h63mr1022902lfd.177.1601029534021; Fri, 25 Sep 2020 03:25:34 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id 73sm1909342lff.118.2020.09.25.03.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 03:25:33 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 25 Sep 2020 12:25:31 +0200 To: Peter Zijlstra Cc: Uladzislau Rezki , Mel Gorman , "Paul E. McKenney" , Michal Hocko , LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Thomas Gleixner , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko , Mel Gorman Subject: Re: [RFC-PATCH 2/4] mm: Add __rcu_alloc_page_lockless() func. Message-ID: <20200925102531.GA25350@pc636> References: <20200921194819.GA24236@pc636> <20200922075002.GU12990@dhcp22.suse.cz> <20200922131257.GA29241@pc636> <20200923103706.GJ3179@techsingularity.net> <20200923154105.GO29330@paulmck-ThinkPad-P72> <20200923232251.GK3179@techsingularity.net> <20200924081614.GA14819@pc636> <20200924111907.GE2628@hirez.programming.kicks-ass.net> <20200924152112.GB19013@pc636> <20200925081552.GS2628@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200925081552.GS2628@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Fri, Sep 25, 2020 at 10:15:52AM +0200, Peter Zijlstra wrote: > On Thu, Sep 24, 2020 at 05:21:12PM +0200, Uladzislau Rezki wrote: > > On Thu, Sep 24, 2020 at 01:19:07PM +0200, Peter Zijlstra wrote: > > > On Thu, Sep 24, 2020 at 10:16:14AM +0200, Uladzislau Rezki wrote: > > > > The key point is "enough". We need pages to make a) fast progress b) support > > > > single argument of kvfree_rcu(one_arg). Not vice versa. That "enough" depends > > > > on scheduler latency and vague pre-allocated number of pages, it might > > > > be not enough what would require to refill it more and more or we can overshoot > > > > that would lead to memory overhead. So we have here timing issues and > > > > not accurate model. IMHO. > > > > > > I'm firmly opposed to the single argument kvfree_rcu() idea, that's > > > requiring memory to free memory. > > > > > Hmm.. The problem is there is a demand in it: > > People demand ponies all the time, the usual answer is: No. > I see your view. From the other hand it is clear, there is still demand in it: void ext4_kvfree_array_rcu(void *to_free) { struct ext4_rcu_ptr *ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (ptr) { ptr->ptr = to_free; call_rcu(&ptr->rcu, ext4_rcu_ptr_callback); return; } synchronize_rcu(); kvfree(ptr); } -- Vlad Rezki