Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TxeEENAY" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37C8B12D for ; Sun, 26 Nov 2023 20:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701058837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=vrAxGQoF6gd7V1Rx42uLiZqFnKDFhpBL7AxUNIWxi4U=; b=TxeEENAY7WFf9lA5oBpIaHv3Eywtnqqln+7e+rbFZDDEjCZ6PMTkceA1e7wkfhO2T9UkXB nYG0y1M6oO1Pn5YF9sctgZfV0/LWuoCAKFC8phpfJL6gf1GsxYpl8UKx2fpdkGqciyEMIe YUJ6Oz1t8Pl1TJfieD+qwxuBPrJ1iRI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-4RH_A7RRPmmMZhIo6iqSCA-1; Sun, 26 Nov 2023 23:20:35 -0500 X-MC-Unique: 4RH_A7RRPmmMZhIo6iqSCA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B35DA3806068; Mon, 27 Nov 2023 04:20:34 +0000 (UTC) Received: from llong.com (unknown [10.22.32.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD8485028; Mon, 27 Nov 2023 04:20:33 +0000 (UTC) From: Waiman Long To: Tejun Heo , Zefan Li , Johannes Weiner , Andrew Morton , Michal Hocko , Frederic Weisbecker Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Mrunal Patel , Ryan Phillips , Brent Rowsell , Peter Hunt , Waiman Long Subject: [PATCH-cgroup 0/2] cgroup/cpuset: Include isolated cpuset CPUs in cpu_is_isolated() Date: Sun, 26 Nov 2023 23:19:54 -0500 Message-Id: <20231127041956.266026-1-longman@redhat.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 This patchset enables the inclusion of CPUs in isolated cpuset partitions in the cpu_is_isolated() check to reduce interference caused by vmstat or memcg local stock flushing. To reduce cpu_is_isolated() call overhead, a seqcount is used to protect read access of the isolated cpumask without taking any lock. As a result, the callback_lock is changed to a raw_spinlock_t to make it work in PREEMPT_RT kernel too. Waiman Long (2): cgroup/cpuset: Make callback_lock a raw_spinlock_t cgroup/cpuset: Include isolated cpuset CPUs in cpu_is_isolated() check include/linux/cpuset.h | 6 ++ include/linux/sched/isolation.h | 4 +- kernel/cgroup/cpuset.c | 127 +++++++++++++++++++------------- 3 files changed, 85 insertions(+), 52 deletions(-) -- 2.39.3