Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3575438pxf; Mon, 5 Apr 2021 16:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+eXe893NVOLEiiGTq7qPxw3LA3dzl8RrH4oaa8bq8iQD8GihmxdEdBVk0Xn+zdWwORTeE X-Received: by 2002:a17:906:e48:: with SMTP id q8mr31386213eji.84.1617664624386; Mon, 05 Apr 2021 16:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617664624; cv=none; d=google.com; s=arc-20160816; b=IphweX38CayrTjs7ZatBuUWckixyTLt2kav4lR4MbgmaNCxRddrJhM1M81R7KGYRoA pSSzT2SElvtku4vFCBu+S2Jq79ffp7bAP4Yno98xsL3yKvgjL9X2KOlP2QXizHsDOFX+ O+0okNZWyhBEiDdtkaC6Gu3jIAETe/BqLZ0hL0Pe59RSxBRjdb5bIgN4hGWNDPItwYaY h986UnC3FkzaiTR7EbRDe2tgfMG/yCnmJC5mB/CQNs9yBKsinju3MiQ7gYagqqyjSPLA vBqKI9D9AxML6YWMPJcJ4UzlI2ycPXPcfbZdw/Tw6VWy6pDOfMaBSEgSs401Jf9ht9tP fglQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=t7axeTbYTC36LKZ+cnF9EodoC2tpcGscx0F02jYpl1g=; b=TYQ9iyyPt5eHDWfOH5zgydS6RnJ8/fPy42h+mjf1JY8DIugyCQnqFZk0A4DYD+CbDo DuNc3ZqPvOyvuFQgmr2GTaCiadrtl6Z3V1fUiUUIVRjMCL2ZD/UCNeK6K1VT8IoqWqvy cWuw51hsSf7HXFvh5daYr41E5kgzl4UVIao5Buq457/rMCcCSDujAEw/i8+WSlBBNhDh +QCk+VcUs0o0QJl/WymytoGR27ANMuoDtMdtADdsxdrVHZpd9DIw5d02+AvhmWHuMHwk UWW1S/Jvb3OZErPuLXr+3ljHzn5VCcROWfeZ9kqoT4wWVLZDPgugy5RfRrfkuAucSFXY ta5w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si14854209edd.558.2021.04.05.16.16.41; Mon, 05 Apr 2021 16:17:04 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241852AbhDEP72 (ORCPT + 99 others); Mon, 5 Apr 2021 11:59:28 -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