From patchwork Fri Sep 18 19:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 11785929 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 2855F139A for ; Fri, 18 Sep 2020 19:48:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3DA321D42 for ; Fri, 18 Sep 2020 19:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nqW26T8O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3DA321D42 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 AE036900003; Fri, 18 Sep 2020 15:48:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A91358E0001; Fri, 18 Sep 2020 15:48:39 -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 9A6DC900003; Fri, 18 Sep 2020 15:48:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 842068E0001 for ; Fri, 18 Sep 2020 15:48:39 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 41259180AD806 for ; Fri, 18 Sep 2020 19:48:39 +0000 (UTC) X-FDA: 77277219558.14.sugar58_2807ed62712d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 1970318229818 for ; Fri, 18 Sep 2020 19:48:39 +0000 (UTC) X-Spam-Summary: 50,0,0,ed3d3b6eadd52ca3,d41d8cd98f00b204,urezki@gmail.com,,RULES_HIT:41:69:355:379:541:965:966:967:973:988:989:1260:1311:1314:1345:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2525:2560:2563:2682:2685:2859:2893:2901:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4385:4390:4395:5007:6261:6653:9025:9040:9413:10004:11026:11232:11473:11658:11854:11914:12043:12048:12291:12296:12297:12438:12517:12519:12679:12683:12895:13069:13161:13229:13311:13357:13894:14095:14096:14180:14181:14384:14394:14687:14721:21080:21220:21433:21444:21627:21666:21740:21788:30054,0,RBL:209.85.208.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.84.100;04y8fuj1fizfp8winyzhugci3ksbropesitmy1qgac6exd65i39jindh5urgncu.dfrt8giw365mze3zptrz98axo6nh387hjbtk63c8ss3eofkx33on3qwq9hqrru7.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Net check:no X-HE-Tag: sugar58_2807ed62712d X-Filterd-Recvd-Size: 4306 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 19:48:38 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id k25so6014380ljg.9 for ; Fri, 18 Sep 2020 12:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rGRBhoEIYM+I62uhtkzSGBAX+5us/YHtB+9Vgg1zTtY=; b=nqW26T8OmNe5+E2dLewM6NhPfcOBIFPhxmshxeaPCd3/CNcEzUwyciqvYOimc4nCWZ d6ahQ6xO9c03qe4fnvRVpFbGe3BbO1F1IHkhs2HizzY1bNziXGzJsPgkJuMLsmHp7bER +BBGfCAMJKqezojoPek2mjW4+mNscce+qsljzbS+zhN3rZxZuCpll8pE+/SZoUXjyFv8 1e41FNCJ5E+DyfiQ78Zf/NKrs9oSsjn0tqD+aAW+GFem3xNt73k94D7Rwdv6hTFW/t8V iEfTfleACAerSnWZOqjud72CkZnzAffr45ahnqzqWLSxtoDTEiB4TKyjLspPkgh4uTQ5 LT3A== 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=rGRBhoEIYM+I62uhtkzSGBAX+5us/YHtB+9Vgg1zTtY=; b=NL7Gosbi+Uckx1YquXuLsbLka+IWNk1zRMe08MXrrlrUoonEWRoURS0pnArM8O0snf iCkTufnrb8XSdcIw072aE/hIPxD/HPIPMxnx7BXXzsRpG3fTQm1eFmr7PiwOh+i7CDf0 50nw/zZ8QfDgJ+ygzR7Xo4o0D1oN8adft4QN+ai+fHxQ1I905UpJVtFx+2Z+/5VrUK1Y DHuxG5c7NsIFnSpzyRVopz5kbrykTwaLEaHpMQXkN39+HTnsW7s4jr6GFRRXR05mYxwJ Oo9iFL8fnU8Rr7kmwlFge7GLPMV+4od0hw9vv/vA6ImXy1CffjWhoC5MFECPpmu6F4YA pRZA== X-Gm-Message-State: AOAM5306Q5cm6vFrp40IPGUy4EpvJNzMlFhwf4vgqnwdjCE35P7uAWtL sv0WVDpyrXTPKqLVU9LNzS0= X-Google-Smtp-Source: ABdhPJyn9sqZurK+0ib9MIFAesyL3MylhyXr116ZbhuJNj3ywoGWgVAqgvt4drq460J31feLyaJP+w== X-Received: by 2002:a2e:b6cd:: with SMTP id m13mr13092130ljo.383.1600458517144; Fri, 18 Sep 2020 12:48:37 -0700 (PDT) Received: from pc638.lan (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id a17sm766769lfd.148.2020.09.18.12.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 12:48:36 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , linux-mm@kvack.org, Andrew Morton , "Paul E . McKenney" Cc: Peter Zijlstra , Michal Hocko , Vlastimil Babka , Thomas Gleixner , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH 0/4] kvfree_rcu() and _LOCK_NESTING/_PREEMPT_RT Date: Fri, 18 Sep 2020 21:48:13 +0200 Message-Id: <20200918194817.48921-1-urezki@gmail.com> X-Mailer: git-send-email 2.20.1 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, folk! This is another iteration of fixing kvfree_rcu() issues related to CONFIG_PROVE_RAW_LOCK_NESTING and CONFIG_PREEMPT_RT configs. The first discussion is here https://lkml.org/lkml/2020/8/9/195. - As an outcome of it, there was a proposal from Peter, instead of using a speciall "lock-less" flag it is better to move lock-less access to the pcplist to the separate function. - To add a special worker thread that does prefetching of pages if a per-cpu page cache is depleted(what is absolutely normal). As usual, thank you for paying attention to it and your help! Uladzislau Rezki (Sony) (4): rcu/tree: Add a work to allocate pages from regular context mm: Add __rcu_alloc_page_lockless() func. rcu/tree: use __rcu_alloc_page_lockless() func. rcu/tree: Use schedule_delayed_work() instead of WQ_HIGHPRI queue include/linux/gfp.h | 1 + kernel/rcu/tree.c | 90 ++++++++++++++++++++++++--------------------- mm/page_alloc.c | 82 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 41 deletions(-)