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.6 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, URIBL_BLOCKED,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 3B6A0C433E1 for ; Thu, 16 Jul 2020 09:19:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EF37720775 for ; Thu, 16 Jul 2020 09:19:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MGtkXGEv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF37720775 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 604586B0010; Thu, 16 Jul 2020 05:19:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B5956B0023; Thu, 16 Jul 2020 05:19:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CAF36B0024; Thu, 16 Jul 2020 05:19:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 3786E6B0010 for ; Thu, 16 Jul 2020 05:19:19 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D976B82499A8 for ; Thu, 16 Jul 2020 09:19:18 +0000 (UTC) X-FDA: 77043390396.20.egg30_3f0cf5126f01 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id AA3F5180BFBA1 for ; Thu, 16 Jul 2020 09:19:18 +0000 (UTC) X-HE-Tag: egg30_3f0cf5126f01 X-Filterd-Recvd-Size: 4933 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jul 2020 09:19:18 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id z24so6300764ljn.8 for ; Thu, 16 Jul 2020 02:19:18 -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=XglsA6vu1woa2kgV/glk7kPKsFN4MeJdNdTHXrJSSno=; b=MGtkXGEvFpIkj3QBS/zV43tPHffYujAQi4Zp06aSfOPecDCub/DAcyfM7olmV30Ixw tqZhEpk3y2XQd5E4zcsoLUe3ig4InefSEGSL/KqACY1iP/QrvC2gFqzlS0xFvJGokl7S i6CsoPR2sgDJREAu7zdQkvBomUEdbqDJ+zLYOFQ3SjoAkLKxRR9zRCfRvnvGrrttubCy b92i+IZ1RyQVfPZHm/jqhPDfR3o55shS2DyMlV7f8bzJ8hIqsmHr+FyjmVLbEwj/wbTj oTsiGUVVGhMz/wq/Nev0l3bOsHm+8WQ3Fv0MWyF65gjjD20gfW+RpXRtClhXoQSNzvm4 euVw== 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=XglsA6vu1woa2kgV/glk7kPKsFN4MeJdNdTHXrJSSno=; b=frWRUI1C6+akfCrVyyT4UcxpB5x3wstlMS0PuLRVgJkfqJ05sUjRxD0tbC/VfJdhxD zEQJ6sM8U7Fqk64a2MoKxs7jw0s4vHvjLXpvAdIhnpko0BEb+qFLsk/mpke8fSTuJ4py bgoV/J9r0K8VI55ykqyIR0wJhnGebcTgO5A4kDiBqdUFRt8kR0XuAbBED64y/sd+Rc8o sb2FLmTFAoEvu2Z0gpQ9Kd1SnmPC3HI/901yXY7sevXTS1PICeGyuNmJwfi20oKCx3Ph e+ecVf4EA7obQZPcks+BZ+ERoMABeU9vIbOZjYFKIoSmQQuLVTY0scDGxPT3QKA5qDba Zg1w== X-Gm-Message-State: AOAM530hCxZ11Xe3Gw3WKzp8aljUO5JmcdNTEqwyZhLhqnr7UQv2uq9X T+PLozUJRcfuM6Fp6Nb7V7/NohthZx0= X-Google-Smtp-Source: ABdhPJwTTPYdBkI8Lx6v0NjO0Y0QrDgy1wgQ7xoBG2m+QJb9nHi8vE5tfNY2GUAlbfogigi6cG2meQ== X-Received: by 2002:a2e:80cc:: with SMTP id r12mr1699421ljg.344.1594891156800; Thu, 16 Jul 2020 02:19:16 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id w19sm920732ljm.120.2020.07.16.02.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 02:19:15 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 16 Jul 2020 11:19:13 +0200 To: Joel Fernandes , Sebastian Andrzej Siewior Cc: Sebastian Andrzej Siewior , "Uladzislau Rezki (Sony)" , LKML , RCU , linux-mm , "Paul E . McKenney" , Andrew Morton , "Theodore Y . Ts'o" , Matthew Wilcox , Oleksiy Avramchenko Subject: Re: [PATCH 1/1] rcu/tree: Drop the lock before entering to page allocator Message-ID: <20200716091913.GA28595@pc636> References: <20200715183537.4010-1-urezki@gmail.com> <20200715185628.7b4k3o5efp4gnbla@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: AA3F5180BFBA1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Wed, Jul 15, 2020 at 07:13:33PM -0400, Joel Fernandes wrote: > On Wed, Jul 15, 2020 at 2:56 PM Sebastian Andrzej Siewior > wrote: > > > > On 2020-07-15 20:35:37 [+0200], Uladzislau Rezki (Sony) wrote: > > > @@ -3306,6 +3307,9 @@ kvfree_call_rcu_add_ptr_to_bulk(struct kfree_rcu_cpu *krcp, void *ptr) > > > if (IS_ENABLED(CONFIG_PREEMPT_RT)) > > > return false; > > > > > > + preempt_disable(); > > > + krc_this_cpu_unlock(*krcp, *flags); > > > > Now you enter memory allocator with disabled preemption. This isn't any > > better but we don't have a warning for this yet. > > What happened to the part where I asked for a spinlock_t? > > Ulad, > Wouldn't the replacing of preempt_disable() with migrate_disable() > above resolve Sebastian's issue? > This for regular kernel only. That means that migrate_disable() is equal to preempt_disable(). So, no difference. > > Or which scenario breaks? > Proposed patch fixes Sebastian's finding about CONFIG_PROVE_RAW_LOCK_NESTING kernel option, that checks nesting rules and forbids raw_spinlock versus spinlock mixing. Sebastian, could you please confirm that if that patch that is in question fixes it? It would be appreciated! -- Vlad Rezki