Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1152883pxb; Fri, 21 Jan 2022 10:59:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVd9QBMokTU9pCgIFTCZGJHUs94eoPV455JWRym/j43Q+ev8mfvbDl7SQETZkyeIm5/1Ty X-Received: by 2002:a17:90b:4f8e:: with SMTP id qe14mr2072216pjb.178.1642791594246; Fri, 21 Jan 2022 10:59:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642791594; cv=none; d=google.com; s=arc-20160816; b=YxF5Fs3Znw/aP7u9LlIQ9pn0/wfr/JvSqtj2rDzWGx1/kfzjhKDYP9BiJor1lZ9itT aY2dT4VDtBWyBLB676kNHFdSdnykc8vkP4Mm43KCLYHQrz7KWaswRpIyUCaMBDIc49Jz IJsQsPIB/m04pX6dy/53odaVCBeNs/v0pytWO4rKBJvIi7jBbI9KVmXwsnK5WzsWuOoI ZN6pWlG6ticA0bbB2iGKOIhwU+Q6f79RLuKjwH1C90G8DrHwEOGnOZB8aUdSYC6cnfrX TvF5evTPn1OzdyowxSpzIPZrONWza0iRvju8uS8G4KCxeJi5kue5NzY9ZRW3vvWHFmEE Cobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=H+HNSzwe2ZTaOtHiiQO8OytOOz442JrIOxdrAt7aFUU=; b=s6F77u6TxjTZJgB3u8vemqtP7VXMMf7jCYZ4g8t3imQHRIApGpoV+Zuzt12EbV3OPf RtaYXKX2hIRs9c/QO8Hepe6igvcRYB0sHKyKWeWpZbdgJLySQqMhflMY2WxOQXAJC42h oVYHcJWUVVE/agWEj3Vakea3MMUVWLH3jJNF0digcS+XBm7ZuVeggj2trMhqL1TI40QV ZFC9eJnENln6+n+GoEC5PdP2uel+yXbRTjlp0zphDSypaUzs+FoZhGvtBb+FHov+Tr3l Sg69Ez7HZzaw5NZAdkwVr9CSeLyaZV2BPU0qL5TS/n0JzK3dk0GL+IJqMf+hzqHIyUQo MfXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IEByE+CQ; 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 y4si7853691plg.225.2022.01.21.10.59.42; Fri, 21 Jan 2022 10:59:54 -0800 (PST) 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=20210112 header.b=IEByE+CQ; 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 S1352555AbiASIiu (ORCPT + 99 others); Wed, 19 Jan 2022 03:38:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234435AbiASIiu (ORCPT ); Wed, 19 Jan 2022 03:38:50 -0500 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2060C061574 for ; Wed, 19 Jan 2022 00:38:49 -0800 (PST) Received: by mail-oi1-x230.google.com with SMTP id e81so3059446oia.6 for ; Wed, 19 Jan 2022 00:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H+HNSzwe2ZTaOtHiiQO8OytOOz442JrIOxdrAt7aFUU=; b=IEByE+CQ6rkZeRGMp+8fC4oRZ4PWmLOqOQOxIVEdAwR5YdNCu9EL5XNWjmMopmOzLL pKnP9DGMLENmdx2wCYu6s3TkKun8XKimWjYORLRxSTQmkLXNgIHOTUY0J0A5y24+11OO b21PpKZMW4V2fvuB0prSs9zDJvsiD4F/tT/5e42IKHwVIHcvKzIA5FwZI+rSCVWvdM3T DIATtslDWLJglvB9o4MZMD7KUsNE+8+NcutOTApLedIzJ8+9WZuCCblTQ7eijq35sDRQ cfe86Y9ozCaH9lS9Mn0YVg5wmb5u8Jng173Zlh2M0Fb7+I/H9Y0l8HN1DMrI07crGwaB P8ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H+HNSzwe2ZTaOtHiiQO8OytOOz442JrIOxdrAt7aFUU=; b=K6iyViU3FKrAUg5Z8FCQzvfVTGtUaZG/AWi0ypdx4DVMGchB7HmZpzsdiK0ChVN7pV noTXdyUy4Dd4gzBC1Iu649OrSCbcPfyYgJwIST+DMQrylJ8Ihk2tuLo6R4RlmLpJntff 22GUuBCsnZ2Zr1p9paMEYe7PrPPvkjouB53vORJwUo00wDN3QxbjsZfSZvmGS4leYAAq G+lPnKCYmqm9lL41IaGNmNWQszMGzpe9gAf3UNWZSbSHFsrw04Wslmy755M8kOCgf2ez QM6BJcCEvD5zsRwVkQXu2Mj2Wqn69Jdk5MbWjSw+lGrUiF0KGDpNOssgyZBnUO/OlBvm guKg== X-Gm-Message-State: AOAM533kqigEvR3qngciYaufjr1xoDMMY8xYX1NYG8317CYI3BUQrCtz vbAm/IByZ6IZsvXJd40VxbVGNn3oECYkTq0WeFkv6dOAU3s= X-Received: by 2002:aca:2802:: with SMTP id 2mr1970691oix.23.1642581529167; Wed, 19 Jan 2022 00:38:49 -0800 (PST) MIME-Version: 1.0 References: <388098b2c03fbf0a732834fc01b2d875c335bc49.1642170196.git.lucien.xin@gmail.com> <39a3470f-06ab-cf41-32e4-80edb249c7d3@suse.cz> <20220117131304.pdc3mfdowkzovw6q@localhost.localdomain> In-Reply-To: From: Xin Long Date: Wed, 19 Jan 2022 16:38:37 +0800 Message-ID: Subject: Re: [PATCH] mm: slub: fix a deadlock warning in kmem_cache_destroy To: Vlastimil Babka Cc: Juri Lelli , Sebastian Andrzej Siewior , Hyeonggon Yoo <42.hyeyoo@gmail.com>, LKML , linux-mm@kvack.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Antoine Tenart , Clark Williams Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 18, 2022 at 7:07 PM Vlastimil Babka wrote: > > > On 1/18/22 09:00, Xin Long wrote: > > On Mon, Jan 17, 2022 at 9:13 PM Juri Lelli wrote: > >> > > >> > RHEL-8 kernel seems to be 4.18, unless RT uses a newer one. Could be some > >> > silently relevant backport is missing? How about e.g. 59450bbc12be ("mm, > >> > slab, slub: stop taking cpu hotplug lock") ? > >> > >> Hummm, looks like we have backported commit 59450bbc12be in RHEL-8. > >> > >> Xin Long, would you be able to check if you still see the lockdep splat > >> with latest upstream RT? > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.16.y-rt > > Hi, Juri, > > > > Thanks for sharing the RT kernel repo. > > > > I just tried with this kernel, and I couldn't reproduce it on my env. > > But I don't see how the upstream RT kernel can avoid the call trace. > > > > As this warning was triggered when the system was shutting down, it might > > not be reproduced on it due to some timing change. > > As it was caught by lockdep and not as a real deadlock, I think it should be > indepenedent of a timing change. Lockdep will correlate potentially deadlock > scenarios even if they don't really occur in the same time, AFAIK. > > But let's go back to: > > > Although cpu_hotplug_lock is a RWSEM, [a] will not block in there. But as > > lockdep annotations are added for cpu_hotplug_lock, a deadlock warning > > would be detected: > > Is it possible that upstream lockdep handles this RWSEM scenario properly > and doesn't report it, but the RHEL kernel is missing some relevant lockdep fix? That's a good point. I actually think: cpus_read_lock() cpus_read_lock() shouldn't be considered as a deadlock. I will check the lockdep changes, and it may take some time. Thanks. > > >> > >> Thanks! > >> Juri > >> >