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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23443C77B6D for ; Mon, 3 Apr 2023 08:38:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231629AbjDCIib (ORCPT ); Mon, 3 Apr 2023 04:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjDCIia (ORCPT ); Mon, 3 Apr 2023 04:38:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF80C2D61; Mon, 3 Apr 2023 01:38:24 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 943051F8D9; Mon, 3 Apr 2023 08:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1680511103; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZnIw06JprC7dy+OnhMRvOYKEzAkA2puzGDnOPlmZGCQ=; b=LDAThqfAUeP8YfeXSMx0SCHxnohK7Gj/nCpVhVUNjqwdqETlqzrvBDKy6zQjJyHIXkNUrb W6q2FQW0lYcUVVPC3UdRINlfnj6L5qLDp56/Q/IMjloPT68YokJAyiWkMM1I2SWlg8W3Ab mdMS9LC6dZdFbLNpceTPxyFhjNTS7Bo= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6879B1331A; Mon, 3 Apr 2023 08:38:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id k4RGF3+QKmQQSAAAMHmgww (envelope-from ); Mon, 03 Apr 2023 08:38:23 +0000 Date: Mon, 3 Apr 2023 10:38:22 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Johannes Weiner , Shakeel Butt , Tejun Heo , Josef Bacik , Jens Axboe , Zefan Li , Roman Gushchin , Muchun Song , Andrew Morton , Michal =?iso-8859-1?Q?Koutn=FD?= , Vasily Averin , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org Subject: Re: [PATCH v2 4/9] cgroup: rstat: add WARN_ON_ONCE() if flushing outside task context Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri 31-03-23 12:03:47, Yosry Ahmed wrote: > On Fri, Mar 31, 2023 at 4:02 AM Michal Hocko wrote: > > > > On Thu 30-03-23 01:53:38, Yosry Ahmed wrote: > > [...] > > > Maybe we can add a primitive like might_sleep() for this, just food for thought. > > > > I do not think it is the correct to abuse might_sleep if the function > > itself doesn't sleep. If it does might_sleep is already involved. > > Oh, sorry if I wasn't clear, I did not mean to reuse might_sleep() -- > I meant introducing a new similar debug primitive that shouts if irqs > are disabled. This is circling back to original concerns about arbitrary decision to care about IRQs. Is this really any different from spin locks or preempt disabled critical sections preventing any scheduling and potentially triggereing soft lockups? -- Michal Hocko SUSE Labs