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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 A5BB9C43460 for ; Mon, 5 Apr 2021 15:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87FC0613A3 for ; Mon, 5 Apr 2021 15:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241897AbhDEP73 (ORCPT ); Mon, 5 Apr 2021 11:59:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:54702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238528AbhDEP71 (ORCPT ); Mon, 5 Apr 2021 11:59:27 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B06E9613A0; Mon, 5 Apr 2021 15:59:19 +0000 (UTC) Date: Mon, 5 Apr 2021 11:59:18 -0400 From: Steven Rostedt To: Waiman Long Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Bharata B Rao , Phil Auld , Daniel Thompson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] sched/debug: Use sched_debug_lock to serialize use of cgroup_path[] only Message-ID: <20210405115918.702a2f8b@gandalf.local.home> In-Reply-To: <4014fe97-5875-f64a-7b68-854a2b08394e@redhat.com> References: <20210401181030.7689-1-longman@redhat.com> <20210402164014.53c84f05@gandalf.local.home> <20210404120231.13843854@oasis.local.home> <4014fe97-5875-f64a-7b68-854a2b08394e@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 4 Apr 2021 21:27:00 -0400 Waiman Long wrote: > Thanks for the suggestion, but it also sound complicated. It's not that complicated. Similar tricks have been used elsewhere in the kernel. > > I think we can fix this lockup problem if we are willing to lose some It's not a lockup problem, it's just a delay. > information in case of contention. As you have suggested, a trylock will > be used to acquire sched_debug_lock. If succeeded, all is good. > Otherwise, a shorter stack buffer will be used for cgroup path. The path > may be truncated in this case. If we detect that the full length of the > buffer is used, we assume truncation and add, e.g. "...", to indicate > there is more to the actual path. > > Do you think this is an acceptable comprise? I guess that needs to be decided by those that use this information. -- Steve