Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp992788pxk; Fri, 25 Sep 2020 03:27:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmwaXHNRzgdE2bC2rtNcPwH0l2pcxeItjGYKb5/OIQFdt3vmJZcukFPQ1+GRQO2YsnNIhE X-Received: by 2002:aa7:d88a:: with SMTP id u10mr492386edq.217.1601029619800; Fri, 25 Sep 2020 03:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601029619; cv=none; d=google.com; s=arc-20160816; b=KesgwJzFVFAa3Q/0JZkdSa428BTfOv+GUS3MkgaUD9CQzeN6V6mYptIkD6kHYG8yNQ A6hciQVrYYJq/MqLLsjgdYmDDRo1cD/GE8jxCItmKomizY0wLuKV0YNA4rrs4akCd/yN F2cqO8ZcuAyYCIqt/P7mbjTyb/iZYAH6COgx9fN24AFwoVMPT4JzN5ofqE/uUSBX0cDO xHpopg5xKnNY6fnHWuu54LAIvIaRr/d9Wc1y+4X2KmTltUtN+zD/fd97rFcsx8WMupp7 HnxRlby3oMTSaUjCrKPcoz9VeIhOvP2QfJQBD/Y1ph1IFNA/PpRxO5nUCOInJT6XX0ko 776g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=EDTrxzVhPvirc6DaIwHmGU5btp2o0zUWFlr+hQsger8=; b=UpD/k4uncH9EfXa8TlLFGGcRYTw9X/pzvVFa5l1j6qumKcmABY0KmBMjzPSUviAsmD JWoZ6x78jpfvpphprG5n0gsc5FvIgP5guK+kDH1oHUxIQkh9HXYWwrLFWnpgEwYk0hXG M5f6WSoQI9UeZAEK8IaJPjVq3UPzipGx2QrHnv7LK1pxMbK3Em1GQBiqxhNZ1DpBv29i 2RhZv+yk13V3chhOgRmn1TEpMAA+xHB2o9pY57eDavOixayNvQC+B+AN/wTTqxrw1t3N XhsMfhP7l1vwCvwvo57djr1KIVRwrdZW/cI+T/t1cXua8HMRpa7/zYSjwzYuo34n1Man 1wqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ms1CpZOJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr5si1382996ejc.370.2020.09.25.03.26.36; Fri, 25 Sep 2020 03:26:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ms1CpZOJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728075AbgIYKZh (ORCPT + 99 others); Fri, 25 Sep 2020 06:25:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbgIYKZg (ORCPT ); Fri, 25 Sep 2020 06:25:36 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C24E6C0613CE; Fri, 25 Sep 2020 03:25:35 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id m5so2210651lfp.7; 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=oNf4ZKDO3ppb9YceftjOU/JSyHW5iEVZ/+4ibfg0RYr8jEZRClftt2IMRBzqmfYkB/ hjBekd+XYtCEABDxeGzqoLq1YVVYtut5x7Tg+YoxuhZaIW+dOYT3FGYIaYb6HH6/bPI9 gMoJkgogJK1pb5ecN33cM5wMWetT9BCffUnjGTVTfHMsFVAO/GsLW5Efs9KfDVxTq7eX XmSNpbyUMUxiAYCJAXfxOk7tk3m1QClP2/NhYN2DEQrFVdvQr2s5k72GPypae9LSivLe DnOXiU85sed/jaJiKnH6VR8lol1LWXF1z1t5nELaEsSUSLVLNDK8dR3mwPiPrx1ci11T KwyQ== X-Gm-Message-State: AOAM532bUM5wfKjyfRTxkM8jGrfS3BLgPlTX7pziVc0kNsN6M2ZyCMoC YNXwhvpZFC2KCq29ceALJbUv3Lg9VXgP5Ayc 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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