Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3579979rwb; Tue, 20 Sep 2022 01:35:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Z0q5v3WUOylYiGyDlknb4ru13AUrvxYZOKLjNetvNzmjBJ4Pqj55qhOS1oXHs2XQHaAuI X-Received: by 2002:a63:5d0c:0:b0:43b:a2df:858 with SMTP id r12-20020a635d0c000000b0043ba2df0858mr1145755pgb.442.1663662916243; Tue, 20 Sep 2022 01:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663662916; cv=none; d=google.com; s=arc-20160816; b=osWCA18CVRglL2ldDpQeHfzBYjBdRuswZiRDvTthFXdKDMcJEhs5uXxD8tsuwfauCP AAG39jaypjKAllJANl4kIWX3ywlP4hx+SEvDOkXGF7rxR4WyWQn2Xin0SReAwjF1HOlj mbvn3qt9fsln9n01yO//EfKW7hRP46261e3cpB3B+5fcuevC4b6mCgWrJ24F5gdc5XYl e+3TJlPPnWRlc0KSEISFpNeLVA3oATfFr7gKuhvl3GiIfgcfKdzlUyHy2E6mpRb00UFq ZHTskEEYcmYXvZsvwEe8u7Dj7xCF2GvLAxrRCVgX0p1aUrOngfHHVhjiF8mb/kQ16Vy7 VkxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=sCP9yCQxHK6W8zHLhqzhqlMNVNEueRQZsr8D5yISAcA=; b=OBl28O4+P0BgGEK+uV6ZmxaKT+of4Mnu5USGg2mxG+JX/A1ogaGfnYlU3VVWiJfqpT SkE4mhGWjPIu3baC64j6Nw32DwGMnOK5jx4Uq3pZj2pZTJdmpwmlatdU1JnZWo9X+Cns fwpyZ25CbwxNI4bYh7p62kJ0HFNNlkknpL1pWpQT+eCDOpdE6zAEosGVa47mVwTzguzW ErMHeZOe+TQJFYLFpVOE5XaTrVWLSRDfzTXlTuo7OgCoFhonqYiJZc1ChcfQNqgVMX// eKfHEG1iEGBRjgvXP6TimZjqx2eDFCLYrH/Ui1SzkghVN9yehNrsY45H/7i99eyvbpGX 3v5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F3DZmMwm; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a170903244b00b00178112e5248si1175764pls.540.2022.09.20.01.35.05; Tue, 20 Sep 2022 01:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F3DZmMwm; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbiITH5I (ORCPT + 99 others); Tue, 20 Sep 2022 03:57:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbiITH5E (ORCPT ); Tue, 20 Sep 2022 03:57:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649C82DFA for ; Tue, 20 Sep 2022 00:57:03 -0700 (PDT) Date: Tue, 20 Sep 2022 09:56:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1663660621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sCP9yCQxHK6W8zHLhqzhqlMNVNEueRQZsr8D5yISAcA=; b=F3DZmMwmkTWUYbHkI5PkXxTCHsXuUfdPA4SDS+pXBz4c+aOIVMsQqJHyJ91jqBeunczZUK xy1SuRjyW+/0aFJIYmWjkzVckARm/9nh0frSlKF7BG7nZIBlpmCYChFFNXbqKNNj6GnpRk uIR61kI/wzQrWDIkqycFLVo3/UDc9cVW9Foc9cbpoR8BkJx/eJjTRui66UAxjY8t2n0T58 +SJj1whEfmToVyHTPRRBdby/JhmWeNEMdX9fmaKfELxh6UzlUWlTh22WrehiKSAeGjcnQ8 QTiQmC1CVS3l8wk6HHbdb0xKoI6GEXXR2hJWc1mMQb/czM6sABurXX+FCWaMfw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1663660621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sCP9yCQxHK6W8zHLhqzhqlMNVNEueRQZsr8D5yISAcA=; b=t4fqyrc35iuryhQT7o7XzHa4e+Oqg5YW5RryTnAtZF8vYmXrMNFsvJyj0hLJVqn5w859Lh oKdSpSKrroythzCg== From: Sebastian Andrzej Siewior To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Maurizio Lombardi , vbabka@suse.cz, linux-mm@kvack.org, rientjes@google.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] mm: slub: fix flush_cpu_slab()/__free_slab() invocations in task context. Message-ID: References: <20220919163929.351068-1-mlombard@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-09-20 16:46:41 [+0900], Hyeonggon Yoo wrote: > > @@ -2730,7 +2735,7 @@ static void flush_all_cpus_locked(struct kmem_cache *s) > > INIT_WORK(&sfw->work, flush_cpu_slab); > > sfw->skip = false; > > sfw->s = s; > > - schedule_work_on(cpu, &sfw->work); > > + queue_work_on(cpu, flushwq, &sfw->work); > > Hi. what happens here if flushwq failed? > > I think avoiding BUG_ON() makes sense, > but shouldn't we have fallback method? You get an output to act on and fix. The point is that it shouldn't have happen in the first place. With the bug_on() that early, chances are that you never see anything but a blank screen. So with the warn_on you get probably to see the warn_on before you get here. Sebastian