Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp317889rwi; Thu, 27 Oct 2022 01:25:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7mORwnTr+v4q3n4Xu5MUAM/1jR9vmOG/RVdo6EAtWsuBlVLPpzT8fkkx/J6Gp7TmEJvpDS X-Received: by 2002:a17:907:8688:b0:791:91a0:fdb3 with SMTP id qa8-20020a170907868800b0079191a0fdb3mr38934318ejc.499.1666859133548; Thu, 27 Oct 2022 01:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666859133; cv=none; d=google.com; s=arc-20160816; b=rR9SkbI1eOpvUKxVwKRRwp6xYodobPPxggJxIpZByP9dTVdaSI683MQnUnG1YuwIW7 q+SYTPH+ew1Bt+GtPsKl3qyFiJudXGz2QUjmjPf9aQMm0sRuhfN8aa0Qr2ibT3UibP3i 6Jlz6Bw0sopmsr9t5wE1cIlMcWDsKqgXtRSxMLf/YwHdVocvigS6zbb8N3n0qqalFeLN OtxzVpUIokOE/D/b100IM3WZ6BQrZTV+TMk47bA3hMZ8TAoqv7CPumi4mYhz5MDloZTE f+1SJPxinBq6nsrzEjdObiUxlMAWBIXQ+2DLOp8Jw3aMI9Q+Rv8Ti7lD3zXU9LA29EKC bt9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KeiSAxf55Qgt0sTgqqzoMI3sslh+XAwt6WemHVLUyTQ=; b=Rgq+rmFRIjL9s9hKil36fyvrT2lWO+gTtEAYslrA7QCekaTjzDOBjOQEpnwQP7k7hM CXnFrCu8m/rZcGPmHENQs2fauDRKzE5AagSFMJlwJgVEknLACqbvijoM7SbBw0b01b3G hr5d4/WzNXEXxitYOajZnYtbowmrNjTYgV9ffTxe9JhUvFsJs0FLW5Naz56f2/DIbeVC r9hZlvje3UAv4/Pre467FmKjHDfzhaa+PL8zFLd60FHrXkKUsAn/80Txs6oPlGlsCmdn Zu+F+U+IqYwIhFAx6tCJdI909//klF8wLiLg6gzhZ3cQ8czWNL/vmOL3rtOsHJas6SPu IeUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jQqE8d7U; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a056402348100b004617e8811c4si740049edc.28.2022.10.27.01.25.08; Thu, 27 Oct 2022 01:25:33 -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=@google.com header.s=20210112 header.b=jQqE8d7U; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234283AbiJ0H4x (ORCPT + 99 others); Thu, 27 Oct 2022 03:56:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234545AbiJ0H4r (ORCPT ); Thu, 27 Oct 2022 03:56:47 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B82A9DBE65 for ; Thu, 27 Oct 2022 00:56:45 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id n130so878304yba.10 for ; Thu, 27 Oct 2022 00:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KeiSAxf55Qgt0sTgqqzoMI3sslh+XAwt6WemHVLUyTQ=; b=jQqE8d7UC08I2MQzXE34te2JuWP/x4Wh7JtL9xmvFOD1ixa5Q0/2bz13L0cENjjYIU fxQZAcOREYgXndWHCDNeOB9EZ9zRQg9GdDx3jgCyuuUqILFGe5M5IN8UWuKdkJcZD+Uo PMo+/lvU1VojB/X8TpGRqx7AFT55PAkNaUVUi0HXTsbILndzK4qly6q8eCq1wxiOnqOP Hdd6TcVSMyS2XyL723FQ96Y2AndzA9cPSl2+QMFV3GoPybP3lrUPbm6Y/OnUQz0HtiUy qrgLeN2gJsCjbUh6UwI3aZh1rjG2uUCTzmcHt25kdSWhijhVnOWP/bQqLY9khdVM2Gg0 DUXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KeiSAxf55Qgt0sTgqqzoMI3sslh+XAwt6WemHVLUyTQ=; b=crp4HlBRxV8KfAnT5HgRSi9DgPoj3XiqoNq5uT+zMIiXNczEefDd0keXAKl7QqjLNW B0Xc9YimYbKUulEtdqFLrlgOloKlQbZuMKMRaP5sHsxmfVLo4Zl68y9GvZOIFwUQOgz5 xVIV2ZpQP0V5hn7YQc2VbU9/Qmmp1QHfAi3byA5odBNdnY8mpytWhfLcWUH/r2Po4bdH RCt+E1UO0Grjq+w72Nqkg6e0LKNe3MTbVLrfv6lhECJVBia9KzTKsm4b27LY0brpz2uT KetUgV0imsl76hTUkVtgroDAqA7rypkUokC4aASYHAXEsprx40QNdv0BOHHi1sutQ8tp VMbQ== X-Gm-Message-State: ACrzQf2toLlIvY6/03BEwoGzyKiQ214pOigPX6csXf2KiZrZqMtQHDfL tAUAbr1NBeeV+BY4VX30fcD6GC4JSdxk8XHdIqJghYmyEeopI41T X-Received: by 2002:a5b:542:0:b0:6ca:1d54:fec8 with SMTP id r2-20020a5b0542000000b006ca1d54fec8mr35103573ybp.45.1666857404857; Thu, 27 Oct 2022 00:56:44 -0700 (PDT) MIME-Version: 1.0 References: <81a7b4f6-fbb5-380e-532d-f2c1fc49b515@intel.com> <76bb4dc9-ab7c-4cb6-d1bf-26436c88c6e2@arm.com> <835d769b-3662-7be5-dcdd-804cb1f3999a@arm.com> <715e4123-fdb3-a71e-4069-91d16a56a308@arm.com> <317b4a96-f28d-aab5-57cc-f0222b7e4901@intel.com> In-Reply-To: <317b4a96-f28d-aab5-57cc-f0222b7e4901@intel.com> From: Peter Newman Date: Thu, 27 Oct 2022 09:56:33 +0200 Message-ID: Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group To: Reinette Chatre Cc: James Morse , Tony Luck , "Yu, Fenghua" , "Eranian, Stephane" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Babu Moger , Gaurang Upasani Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Hi Reinette, On Wed, Oct 26, 2022 at 11:12 PM Reinette Chatre wrote: > The original concern is "the stores to t->closid and t->rmid could be > reordered with the task_curr(t) and task_cpu(t) reads which follow". I can see > that issue. Have you considered using the compiler barrier, barrier(), instead? > From what I understand it will prevent the compiler from moving the memory accesses. > This is what is currently done in __rdtgroup_move_task() and could be done here also? A memory system (including those on x86) is allowed to reorder a store with a later load, in addition to the compiler. Also because the locations in question can be concurrently accessed by another CPU, a compiler barrier would not be sufficient. -Peter