Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp104241lqn; Thu, 11 Apr 2024 15:44:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJp4HlQh5B0p1ScvO2caQDiRT3ja5ODE2/+ieh78i/uVUdKepN7akuRdrSscGF0hx6QawwEVNkBnDm5on6GrgevbHAZ09zpnC+NDlfrw== X-Google-Smtp-Source: AGHT+IEqDUpZmQiZH+kfSi2vLs6T6D673sBkgZ+g3jFYUTJhJpez14sqAWkzJXvJSnAtubVuNVEv X-Received: by 2002:a05:6512:2247:b0:515:d176:dfd1 with SMTP id i7-20020a056512224700b00515d176dfd1mr734870lfu.56.1712875472318; Thu, 11 Apr 2024 15:44:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712875472; cv=pass; d=google.com; s=arc-20160816; b=ExyymkrouwFFFI/bpilk3/OaUzxb7EL8x9j2K/O2Wsma2zXf3X/6o6iAFKOdBlYLnV baV7hQ6TIDunZQdBY9zCZgCrksiOiRVr08cA/86bH0cI0+AKJu1pEGxvHzwXMI7SjPZE sb4MQm0a2Y42JRu1inOgZPNDGHqu6X+qBHjavsXD0SMzjXkgzpNBUcRY1b98dvHkp5Yq 65EAYXynj3VM2kYf+qz73Yg5mnQ8wYzCeGIanGsLrOrnmpnrJrv31Z+ORJyM1bq2XDyV P/qpfpdgEUE+ZzDtdALU/YzRfV4nllzJmU5Si/ayZKyRDrOY0FvzY57A2+gSgRl5mhbP wFxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ilRQZBQS3smaJaaasOsAmTKipdP3RLPWslWfu7o2kgk=; fh=HAvQVb1E3LkgwgPbGboHJVZXKC5THPyr/FjrtjDMjPo=; b=jGgs8UKK6j3aCvdYJubnUz9wUlU2wPQUDMmarlkXS6NvTdEJP8G+Y3utiHqBOGVIy9 kvx2QcsXSjmN6rbZiAx7wNU1Flias6aRLG5dMeCl3BVaKuAGUhg1JP1m5Q1EJKFWxNc9 AhzYp1ozp+DRIBZTSOlpxLGkpml7tPtCvTrmxLwyM721iSQ2joMqezwd6qWwC6ufVmkt wNC8L1CHkHJRiqOdYQFKyQ5QaHfLWn7NxgEdkw8dECJ0WHNxGqx11EWtyfd04ym9gTBm wDHMtwcvhRt3gpur8kD/JJ029znGEf0QuNW73hfkmA4N2BuxXvqYbKJz9AHrz6IzhM8k Frtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="v4tF4/mR"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-141676-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ji5-20020a170907980500b00a51d3658a7asi1152908ejc.594.2024.04.11.15.44.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 15:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141676-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="v4tF4/mR"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-141676-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F2A721F2506E for ; Thu, 11 Apr 2024 22:44:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B6FC47A64; Thu, 11 Apr 2024 22:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="v4tF4/mR" Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6441647A40 for ; Thu, 11 Apr 2024 22:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712875463; cv=none; b=FYnaCKVIZMXVgH4j+nl0SOlb0ps1afrM4b8ZmlmUi5rl8MXoZZHDpiQiXuWwebYfJ15gYMF8V/YX9Ga18QQ3HfX+8FHL4j7E4nTGsUQlNAiTzHAQHDsI3CpD7MBKYuVvKlrSpLupdreHeXf3qrN6VDNm2sWY0PxTrpJgeoGPY/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712875463; c=relaxed/simple; bh=ilRQZBQS3smaJaaasOsAmTKipdP3RLPWslWfu7o2kgk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WNEtgm1ylTrX3cdaL1XNkqEwO59fKDBn4+msUeQgdQUAh9iDleVmHfFFgufIWiQR9Zjz9X8p9q7HRSRGezZFhO/VihBiQsewiH25U/oBZCBRLIU+oIGOvHcNHXv5dtfVa8YpsbCFeXdgAKqHXWOh898LGEQ5P95izPGrzQs/xD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=v4tF4/mR; arc=none smtp.client-ip=209.85.166.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-36aff988d73so19655ab.0 for ; Thu, 11 Apr 2024 15:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712875461; x=1713480261; darn=vger.kernel.org; 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=ilRQZBQS3smaJaaasOsAmTKipdP3RLPWslWfu7o2kgk=; b=v4tF4/mRN+bqL5TVG3CtqTCHGKH0k2z3QR1dnk7W4GkxgmmIA4wx878M15RGZzbbXP CwLAkcPP0YB8SEH7LQ5ULVoCfTlSdpnMbZvU3Lv9KiwYRH/KBhnLCyoz5HP2j+uZDQ47 XjJTmB0gv40Ju4xV+CrFAj1HR2nCjkN7yFWW4bzCXZeMijR4FIg9Bandeopbw3GZfVcY F7NXTUpHv4/JF4vALXIEgBL7ibx9EbVolCYLZCSsK0Sf/v1RWbnT7V3W1FP+GrzbMCpg McxqPi9VXMipyZxssmojSOvsdQ6sMGtmlWRskIYLNO0SrjNSc7R7ewggHS762q3gxgx3 o6jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712875461; x=1713480261; 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=ilRQZBQS3smaJaaasOsAmTKipdP3RLPWslWfu7o2kgk=; b=wQJgyRhkNgD3ijDRdcekkREZHxPdWl3VM7MSZKFMhrE/Qxg2taxu+2VomfVuouCrO4 Aah2qI478ptyW5T5+vnXOiwrFgLMCka24EV9G3HYH36+URYdkg9dKy+MyAfzxfzJTW/u UV1DlxO+/U62vUvHTlnFDlFWRVDYX7ZLg98r8n1HY0TCtRr94MRmGIyocPcqT6xMUGhJ qDyAODT5TlfPGqIsdInY2B8ivRJu9AYxTMT7xM0Jlcfck1yOlzUokaqdUyrzSEavDF8f ZM3yIUq5FcXoZvdbZCM3lnXRB8ORHK6F7hHmWDu8Pb4mxz2al+Nyo+tEP1Fvt1pR0Fs3 1qoA== X-Forwarded-Encrypted: i=1; AJvYcCUtB7bx8sz5PDAwHV27UFsilMfmTHdpWdUlznICYLuzZfYetmOuS/eijjdW3NzkntV05ligAe10TmZMxuaCZMI7i7wcBRZ8Af+Lx+/4 X-Gm-Message-State: AOJu0YzKxkg+YMYAeuSetrZaUjIVayga9S0SK5SEL7aWVPYqEyI52SfH DvFiMw4w+xX8t4IooCh75GJmliN6ISxBodsSp1uZ7qmDmJDk6SVrQyx2ZTsrYhuReNUnMNmF8VI s2me/qJb10ICqRQ+WeD9x1jGuXcmpMlDSbcUl X-Received: by 2002:a05:6e02:1308:b0:36a:374c:4a5e with SMTP id g8-20020a056e02130800b0036a374c4a5emr75985ilr.22.1712875461385; Thu, 11 Apr 2024 15:44:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325172707.73966-1-peternewman@google.com> In-Reply-To: From: Peter Newman Date: Thu, 11 Apr 2024 15:44:10 -0700 Message-ID: Subject: Re: [PATCH v1 0/6] x86/resctrl: Avoid searching tasklist during mongrp_reparent To: babu.moger@amd.com Cc: Fenghua Yu , Reinette Chatre , James Morse , Stephane Eranian , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Uros Bizjak , Mike Rapoport , "Kirill A. Shutemov" , Rick Edgecombe , Xin Li , Shaopeng Tan , Maciej Wieczor-Retman , Jens Axboe , Christian Brauner , Oleg Nesterov , Andrew Morton , Tycho Andersen , Nicholas Piggin , Beau Belgrave , "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Babu, On Thu, Apr 11, 2024 at 3:34=E2=80=AFPM Moger, Babu wrote: > > Hi Peter, > > On 3/25/2024 12:27 PM, Peter Newman wrote: > > To avoid this issue, this series replaces the CLOSID and RMID values > > cached in the task_struct with a pointer to the task's rdtgroup, throug= h > > which the current CLOSID and RMID can be obtained indirectly during a > > context switch. Updating a group's ID then only requires the current > > task to be switched back in on all CPUs. On server hosts with very larg= e > > thread counts, this is much less disruptive than making thread creation > > globally unavailable. However, this is less desirable on CPU-isolated, > > realtime workloads, so I am interested in suggestions on how to reach a > > compromise for the two use cases. > > Before going this route, have you thought about your original solution > where CONTROL_MON groups sharing the same CLOSID? > > [3] https://lore.kernel.org/lkml/CALPaoCj-zav4x6H3ffXo_O+RFan8Qb-uLy-Ddtk= aQTfuxY4a0w@mail.gmail.com > > May be it is less disruptive than changing the context switch code.. Thou= ghts? If had I ever posted that series, it would have contained the very same changes to the context switch code, because that solution causes rdtgroup->closid fields to change on almost every schemata write. -Peter