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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 B9B5AC43619 for ; Wed, 17 Mar 2021 15:49:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7412D64F4D for ; Wed, 17 Mar 2021 15:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232129AbhCQPss (ORCPT ); Wed, 17 Mar 2021 11:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231184AbhCQPsN (ORCPT ); Wed, 17 Mar 2021 11:48:13 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E3CC061762 for ; Wed, 17 Mar 2021 08:48:00 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id h7so1729646qtx.3 for ; Wed, 17 Mar 2021 08:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=PpXNcXKdzRtlF0DyNrTs1rR4Tp219yW9ySrsZXlWEb0=; b=O5WPaBt8k7zfeJ9AhukXu2PXCatdCnHXqSVI1YzuCF99kPs17NK7ErjkPQA0OsNruO TvomsCM1kYC3a1MGIRng05fBnC/60k89ZrQ7Gh//mTsv8Pdk3tiZS3+FHiMXYYFP15My Ad/Z/DGuVlyThUKFbMGc4WdBc0altxcDfemFU0TQsJqFV0/ysT9TJh63K0H3ZrY2QOeG 449lMmV/O6Lq+sIyXvKcUkq9VCzJbn05i5Rvn1Iabk0H3yJLhHrZhWU+cH7T8+sIg3b8 mjomUJmylYKV2bSIe/82zYeS/KQtAN9AN66dCM0JprZSeX6ZR5FSdyPBn1JbOSVelH5F d7lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:in-reply-to :message-id:references:mime-version; bh=PpXNcXKdzRtlF0DyNrTs1rR4Tp219yW9ySrsZXlWEb0=; b=Y/2UMMZnkEurpbOLhjZDWcCOKWlArnQLDJ+1+lNBlzbgTvTV5tuQkRu/pob4XurwzI gwiniT9HjKdd1oCjTRSWiUELeTkKDoVZSCuRm+C6BqQcO3biG0RLj0kWBQfVM1YC2frB L3SmC3uCEvN3PK2Sr2P9bHGdmJK9briuQzZwx+vMqxmYyLSmzfvgagE87DpWbtPnFhgE ysj/jRMSlkCK1c2stybewneevtbPD5r5lVFEL6IObl90y79CS537rTjSXQIGR1FfE27t bOsmxf4QGXSSLGqh0HFmxsw5Y8j6Y75W0G7NN/GVInMU/rAY2Wj9EcPTGzKhxCTvmc5x 0YQg== X-Gm-Message-State: AOAM5320LKXBP2wqFSkMMN4lMy+ORp6LK3am61coII8uRR2QqiB6+3Tf CQhDUS4tiJkKRyBP0FL8tJ8= X-Google-Smtp-Source: ABdhPJwByHQ46fNlAvhkI4IXF4d9eZ6IL7F1dninyIBdKG7xjkR2UIj5IpyWYy2TgWgbmA4ULAbxSA== X-Received: by 2002:ac8:6695:: with SMTP id d21mr4787932qtp.269.1615996079797; Wed, 17 Mar 2021 08:47:59 -0700 (PDT) Received: from fionn (bras-base-rdwyon0600w-grc-06-184-147-140-29.dsl.bell.ca. [184.147.140.29]) by smtp.gmail.com with ESMTPSA id z7sm17497723qkf.136.2021.03.17.08.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 08:47:59 -0700 (PDT) Sender: John Kacur Date: Wed, 17 Mar 2021 11:47:51 -0400 (EDT) From: John Kacur To: Peter Xu cc: Daniel Wagner , linux-rt-users@vger.kernel.org, Clark Williams , Daniel Wagner Subject: Re: [PATCH] rt-tests: Drop use_current_cpuset() check In-Reply-To: <20210317152100.GL395976@xz-x1> Message-ID: References: <20210315193707.359702-1-peterx@redhat.com> <20210316081826.bthxqja6shbcp36j@beryllium.lan> <20210316200705.GC395976@xz-x1> <20210317074903.5lskayjwylnvuhks@beryllium.lan> <20210317125147.GH395976@xz-x1> <7882bec5-be12-267f-94c1-3b7c21193686@redhat.com> <20210317152100.GL395976@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org On Wed, 17 Mar 2021, Peter Xu wrote: > On Wed, Mar 17, 2021 at 11:08:31AM -0400, John Kacur wrote: > > > > > > On Wed, 17 Mar 2021, Peter Xu wrote: > > > > > Hi, Daniel, > > > > > > On Wed, Mar 17, 2021 at 08:49:03AM +0100, Daniel Wagner wrote: > > > > On Tue, Mar 16, 2021 at 04:07:05PM -0400, Peter Xu wrote: > > > > > I think what I'm missing is why we had such a restriction. Quotting from the > > > > > commit ID: > > > > > > > > IIRC, the current behavior allows the process to be placed into a cgroup > > > > with a subset of CPUs and you just can do 'cyclictest -a -t'. Process > > > > should not ignore external configuration. That's my whole point here. > > > > > > In that case again I think a sane solution is not to check the cpu list in > > > every single tool we use, because even if we do that for all tools in rt-teets > > > repo, we can't guarantee to have this check for the rest tools to not ignore > > > this restriction. > > > > > > A simple example is: what if the user specified "taskset -c $CPU cyclictest -a > > > $CPU -t 1 ..." where $CPU is not in the allowed list of current bash? As long > > > as the taskset would work the so-called "environment" will be changed before > > > even loading cyclictest. > > > > > > If you see that's the point I said we should fail at the same check point of > > > sched_setaffinity() rather than checking it explicitly in the tool, because > > > if we want a real-world restriction that's the only place I think it's possible.. > > > > > > But I'm not a cgroup/container guy, please correct me if I understood. > > > > > > -- > > > Peter Xu > > > > > > > > > > When cyclictest and friends were originally written, we had this view > > point that we "owned" the whole machine, and didn't have any restrictions > > on where to schedule. As machines grew in size, and we added numa > > awareness, and cgroups became more prominent we added this code that tried > > to schedule according to the ill-defined environment that we found > > ourselves in. > > > > As Peter points out we may have restricted ourselves more than is > > necessary, and can rely a bit more on the operating system to restrict us. > > On the otherhand using taskset is an easy workaround if the current code > > is to restrictive. > > > > Because we can use taskset and things are working well otherwise I don't > > see this as super urgent, but I am willing to revisit this code and make > > it less restrictive if that makes sense. > > > > I also am not a cgroup / container person, and would like to play around > > with this a bit more before we make some decisions on which direction to > > go in. > > > > Does that make sense to everyone? > > Sure thing on my side. No bug reported so far this time, so I'll wait at least > until then :) I just don't know why it's not hit just like oslat since I don't > see a difference. When I fixed the oslat thing, I thought cyclictest didn't > have such issue for some reason so I didn't consider to touch it at all. But > when yesterday I rerun some tests I see this issue on rhel8, hence this patch. > > Thanks, > > -- > Peter Xu > > Thanks Peter - I appreciate it! John