From patchwork Mon Mar 30 02:32:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 11464463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DBEF1392 for ; Mon, 30 Mar 2020 02:33:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CEA7C20735 for ; Mon, 30 Mar 2020 02:33:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="jbVb7rCD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEA7C20735 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BAF426B0006; Sun, 29 Mar 2020 22:33:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B38706B0007; Sun, 29 Mar 2020 22:33:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FFB06B0008; Sun, 29 Mar 2020 22:33:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0182.hostedemail.com [216.40.44.182]) by kanga.kvack.org (Postfix) with ESMTP id 852506B0006 for ; Sun, 29 Mar 2020 22:33:32 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7E87C181AD0A1 for ; Mon, 30 Mar 2020 02:33:32 +0000 (UTC) X-FDA: 76650457464.13.test69_5913e9a5dbd15 X-Spam-Summary: 2,0,0,805debd12b5dcd6c,d41d8cd98f00b204,joel@joelfernandes.org,,RULES_HIT:41:69:152:355:379:541:965:966:967:968:973:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1535:1542:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2525:2553:2559:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4362:4385:4390:4395:4605:5007:6117:6261:6653:6742:7208:7875:7903:8784:9025:9113:10004:10400:10450:10455:11026:11473:11657:11658:11783:11914:12043:12291:12296:12297:12438:12517:12519:12555:12679:12683:12895:12986:13071:13161:13229:13845:13870:13894:14096:14097:14180:14181:14394:14659:14721:19904:19999:21080:21444:21451:21627:21740:21790:30054:30056:30070:30090,0,RBL:209.85.222.194:@joelfernandes.org:.lbl8.mailshell.net-62.14.0.100 66.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL :0,DNSBL X-HE-Tag: test69_5913e9a5dbd15 X-Filterd-Recvd-Size: 5519 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Mar 2020 02:33:31 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id c145so17490086qke.12 for ; Sun, 29 Mar 2020 19:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I4Nrsn6k3gNjz4BOh5fYXmBusY3PxyBtFMiw/JeGaFI=; b=jbVb7rCDOQJz/kZvzoZg+nCBb4KUFEC+TOEHwI4K8l+pGSIYeCpBI96P01eV0zI9Xp UNulmO6Khkf8qD/AV6xh9l+zZWLcHZ1inkxlOpcjtRZ6MlaiZ2Q7kqdApuFN8GuiCNpu Wr49Ico00ahZmHYOYYNSeavwXVppbVFOAov0I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I4Nrsn6k3gNjz4BOh5fYXmBusY3PxyBtFMiw/JeGaFI=; b=f0tYHIq5yqnesZT1gtA8n4Fa92e2NaL9dDkwsOjwf3CEQT0GiE4G5fuQFBTEPC2lT0 8P1hzJm1QO+pC8Js8Lw9GMM1y1UgiWXxwrVvSfJH0fCSQlHnuSyCI3+B8LKE+1/NsX0P ILkkogvkVo6DzvUMz6mTpjgrznCbr3nRiWOBmOtFLEGIVAGA7iNBEeXomDf/m81zBpiK hAV+4yahCQ8pFVsoWyOpsw7QcHJBtsrbiDtsCzyeD5q/NUV/RaSFtvXwDWlZe/7ibHys P5KiOmq9PEV264QzxGjRPxwBlkkDLeJolztwk30lyHdsu6Q48YXYdsgZ3Ug4et0qZItm IXYA== X-Gm-Message-State: ANhLgQ1OQSzvmEgDJgw22y/D50KBZ12ejguZlOBcZ9dMq7vTFCcmvPqJ 43ov4wOGotYu5JPhhe44A+Q6LA== X-Google-Smtp-Source: ADFU+vtXh936KTMI8VcRei3o2sQCtsNDgg/nJ1FXpiRXs/K5bI0kVr1o3ZMKLWaw3v458vKR4rRcmA== X-Received: by 2002:ae9:e00d:: with SMTP id m13mr9901951qkk.297.1585535610977; Sun, 29 Mar 2020 19:33:30 -0700 (PDT) Received: from joelaf.cam.corp.google.com ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id q15sm10030625qtj.83.2020.03.29.19.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Mar 2020 19:33:30 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Andrew Morton , Ingo Molnar , Josh Triplett , Lai Jiangshan , linux-mm@kvack.org, Mathieu Desnoyers , "Paul E. McKenney" , "Rafael J. Wysocki" , rcu@vger.kernel.org, Steven Rostedt , "Uladzislau Rezki (Sony)" Subject: [PATCH 00/18] kfree_rcu() improvements for -rcu dev Date: Sun, 29 Mar 2020 22:32:30 -0400 Message-Id: <20200330023248.164994-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.26.0.rc2.310.g2932bb562d-goog MIME-Version: 1.0 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: Hello, These patches improve kfree_rcu() to support: - kfree_rcu() headless usage. - both vmalloc() and slab free'ing support using array of pointers. - simpler debugobjects handling. It applies on rcu/dev branch as of March 29th. Testing with rcuperf shows following changes. The memory footprint reduces and batches go slightly up. This is assumed an acceptable change. with all patches: Total time taken by all kfree'ers: 27312964461 ns, loops: 20000, batches: 3120, memory footprint: 211MB Total time taken by all kfree'ers: 26773272309 ns, loops: 20000, batches: 3084, memory footprint: 208M without: Total time taken by all kfree'ers: 25711621811 ns, loops: 20000, batches: 2814, memory footprint: 230MB            Total time taken by all kfree'ers: 25775800546 ns, loops: 20000, batches: 2755, memory footprint: 230MB These have been pushed to the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (branch rcu/kfree) cgit view: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/log/?h=rcu/kfree thanks, - Joel Joel Fernandes (Google) (5): rcu/tree: Simplify debug_objects handling rcu/tree: Clarify emergency path comment better rcu/tree: Remove extra next variable in kfree worker function rcu/tree: Simplify is_vmalloc_addr expression rcu/tree: Make kvfree_rcu() tolerate any alignment Uladzislau Rezki (Sony) (13): mm/list_lru.c: Rename kvfree_rcu() to local variant rcu: Introduce kvfree_rcu() interface rcu: Rename rcu_invoke_kfree_callback/rcu_kfree_callback rcu: Rename __is_kfree_rcu_offset() macro rcu: Rename kfree_call_rcu() to the kvfree_call_rcu(). mm/list_lru.c: Remove kvfree_rcu_local() function rcu/tree: Simplify KFREE_BULK_MAX_ENTR macro rcu/tree: Maintain separate array for vmalloc ptrs rcu/tree: Introduce expedited_drain flag rcu/tree: Support reclaim for head-less object rcu/tiny: Move kvfree_call_rcu() out of header rcu/tiny: Support reclaim for head-less object rcu: Support headless variant in the kvfree_rcu() include/linux/rcupdate.h | 53 ++++++- include/linux/rcutiny.h | 6 +- include/linux/rcutree.h | 2 +- include/trace/events/rcu.h | 8 +- kernel/rcu/tiny.c | 168 +++++++++++++++++++- kernel/rcu/tree.c | 315 ++++++++++++++++++++++++++----------- mm/list_lru.c | 11 +- 7 files changed, 443 insertions(+), 120 deletions(-) --- 2.26.0.rc2.310.g2932bb562d-goog