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 215CFC678D5 for ; Wed, 8 Mar 2023 10:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbjCHKbi (ORCPT ); Wed, 8 Mar 2023 05:31:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjCHKbM (ORCPT ); Wed, 8 Mar 2023 05:31:12 -0500 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E269B95F5 for ; Wed, 8 Mar 2023 02:30:35 -0800 (PST) Received: by mail-qv1-xf2e.google.com with SMTP id ff4so10796526qvb.2 for ; Wed, 08 Mar 2023 02:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678271432; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JIIXmoaoZ2cbg5syPX+iagmSH5eLIxghMqLgfdresrM=; b=GkdzxzBuvM11CVaZf+28wtzXhwqDTZMtiU+AQxw8EGHiKa5frXUqsvzL0Cmy7NzC9s VylIWDwYtJpFWKxIJxXqpC02AWb4cKC6q6Mlh4lEujJ+IjSlzkSmCVySG/qbO3mpXrS5 PhUPio0xQpbmJXWNNvK42EaWF06TvZersDk2HXoJVzOfWF8F9sJff9PJbbfKF0RPUvgk rSZifiQOomQJTmJ0lyZmU2ZI5jt+cjUBPXhiKOxYyzRxAP5IbM/GdGIYqWlXWfELh7bx pK0coGjFj+FQWvVd+yZzUh8IcsMGIXZrIUMYlpxRoBoj0JahqqHCRg8/jqZ3JgYSbG7F 5gUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678271432; h=content-transfer-encoding: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=JIIXmoaoZ2cbg5syPX+iagmSH5eLIxghMqLgfdresrM=; b=BDLKGHzb4wUZkUn+d9niHi+4UOw8qOu9vNVuqWHKhrU0KRfZKzaYnhf5FKtv4W112R fToqjazou5+nU2SuCuOG22JZJPrlWhEyzqTaqcz4ZExFz46Dd4VrxPDL072UUiNtB4V5 bFp9leDXzuFiMQ+GA/g8ScqQXEcJTyz6Qa/lDiAgRjnKAwfH7LMzQ5tJnwM1S8IF7rZL SuyzK6nxrC466Xp/P1zZ95oUE4DzfNdal2E5Ec5YAi898xAl5uvSc9zI20kZZPvL/pdK Tme2om2wJdnusfliOvMp0PMiqJjf7QufnxIUEKVegErGamBvUJrOwd0ZqoIUPLZMUH8g wtNw== X-Gm-Message-State: AO0yUKXHeSQcYNLPiSbIvndWBUdir6RBlmXm3U35lIBAO69/rXPMo6tq Erg1XmbeqVL0vfexrnuTsDIHbismD2P7dmosfH5OnA== X-Google-Smtp-Source: AK7set/TsUg9QUZT5R1x5V3XpvnjRnxQEc0Dg8JHiwwFzQtnB4XsQdffeMF2xgS19+5dFw1vAJw0BNGhuu/L9TZIVdw= X-Received: by 2002:ad4:58c1:0:b0:56e:a066:5016 with SMTP id dh1-20020ad458c1000000b0056ea0665016mr4476607qvb.5.1678271431834; Wed, 08 Mar 2023 02:30:31 -0800 (PST) MIME-Version: 1.0 References: <20230113175459.14825-1-james.morse@arm.com> <20230113175459.14825-8-james.morse@arm.com> <678c5d45-eb91-c000-76d6-7ed9341e52c3@intel.com> <4002faaa-d93a-0d9b-0234-05bfae3d7b93@arm.com> In-Reply-To: <4002faaa-d93a-0d9b-0234-05bfae3d7b93@arm.com> From: Peter Newman Date: Wed, 8 Mar 2023 11:30:21 +0100 Message-ID: Subject: Re: [PATCH v2 07/18] x86/resctrl: Move CLOSID/RMID matching and setting to use helpers To: James Morse Cc: Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org, Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, xingxin.hx@openanolis.org, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On Mon, Mar 6, 2023 at 12:32=E2=80=AFPM James Morse w= rote: > On 02/02/2023 23:47, Reinette Chatre wrote: > > On 1/13/2023 9:54 AM, James Morse wrote: > >> + resctrl_arch_set_closid_rmid(tsk, rdtgrp->closid, rdtgrp->mon.rmi= d); > > > > This does not use the intended closid when rdtgrp->type =3D=3D RDTMON_G= ROUP. > > Yes, it should be rdtgrp->mon.parent->closid. > > rdtgroup_mkdir_mon() initialises them to be the same, I guess its Peter's= monitor-group > rename that means this could get the wrong value? I noticed this earlier. The next revision of my MON group rename patch series updates rdtgrp->closid to that of the new parent so that for MON groups, rdtgrp->closid =3D=3D rdtgrp->mon.parent->closid continues to hold. It looks like rdt_move_group_tasks() assumes this, as it always sets t->closid to rdtgrp->closid. -Peter