Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5727405imm; Sat, 19 May 2018 08:19:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqHFP2jDa8ibrH57xcaFVwb+uYAAyWmy6WURj0MVTknuYbCiy3GccKRcwjnFKCUKtuq7sp3 X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr13983513plb.332.1526743178596; Sat, 19 May 2018 08:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526743178; cv=none; d=google.com; s=arc-20160816; b=nYJgOVfUXHza6R8cmYKzxhWGuU6kzSCakRsBV4OFnySB8Ba6zO5EirJbM9jC7D10M9 THP7Mm8Z2uIVOUl2Wvk2GyyIBEUgEodnQmJaluVYgNsYE32134uCANGcLKjPUqmFZM9o liAKrDc7ug+o/GH8NlMscnaOb1R7pqbr4bHruRY1MbeuX8ixS5/O84H9rPzIZ/2uUq3R rEQRhIh8yKtCO4cgzvi7xHzcUWflEK90tBPTPQAS1IlLXbJOUSbGqdSgAeYlGNMQQx+Q zq4DHzkdSFPWdRObz5xQlc2S7Wo3Y7pawmK+C+1tNg7f0Y7ypBsL5tQxhNZId+QpGtbC Kr2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=PZ7eei0l4KkscjreTHMqrUiPcyJ67+udeNhAdp/JJz4=; b=dWV1iPlRbm481h+B5/N7qVzdYu2CIiHZgHpFfN8D2A8JO1glA6jLe6czOj29+uhpLc 4hKMCBoH/XfxK3CHHbgyt7fb4xCxRFwcdMNdNBZIvp+b6UhfJcy6zhw/BCL04wsod6jz 0UVoN4lBCWD+3p7kNuRuo/NHtIemMJekmqGrK0Qox+AM1IueUWL5TKQpwe1+prm1RglW 4KFxy+22A5ZR7+2WjZ7XZHhCYy7yqE5hsM5V6ufFvLVYkHJ4Ln2P29f3bnpCZmbzEyAS wxPygAN3JxJeo0XnWVVG3gKflQlI3tMSZ4M6wORmnTH5VXx4WaQSiQKYymt6TLbf/eZG vlgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2-v6si10198064pfm.220.2018.05.19.08.19.10; Sat, 19 May 2018 08:19:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752459AbeESPTC (ORCPT + 99 others); Sat, 19 May 2018 11:19:02 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55997 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbeESPTB (ORCPT ); Sat, 19 May 2018 11:19:01 -0400 Received: from p4fea4eb5.dip0.t-ipconnect.de ([79.234.78.181] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fK3cx-0001q6-IN; Sat, 19 May 2018 17:18:35 +0200 Date: Sat, 19 May 2018 17:18:35 +0200 (CEST) From: Thomas Gleixner To: Reinette Chatre cc: fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com, gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 09/39] x86/intel_rdt: Enable setting of exclusive mode In-Reply-To: <975917b4b8e0ac91fa2b315d9ea1016c93d80870.1524649902.git.reinette.chatre@intel.com> Message-ID: References: <975917b4b8e0ac91fa2b315d9ea1016c93d80870.1524649902.git.reinette.chatre@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Apr 2018, Reinette Chatre wrote: > +/** > + * rdtgroup_cbm_overlaps - Does CBM for intended closid overlap with other > + * @r: Resource to which domain instance @d belongs. > + * @d: The domain instance for which @closid is being tested. > + * @cbm: Capacity bitmask being tested. > + * @closid: Intended closid for @cbm. > + * @exclusive: Only check if overlaps with exclusive resource groups > + * > + * Checks if provided @cbm intended to be used for @closid on domain > + * @d overlaps with any other closids or other hardware usage associated > + * with this domain. If @exclusive is true then only overlaps with > + * resource groups in exclusive mode will be considered. If @exclusive > + * is false then overlaps with any resource group or hardware entities > + * will be considered. > + * > + * Return: 0 if CBM does not overlap, 1 if it does. > + */ > +static int rdtgroup_cbm_overlaps(struct rdt_resource *r, struct rdt_domain *d, I think this should be bool not int. > +/** > + * rdtgroup_mode_test_exclusive - Test if this resource group can be exclusive > + * > + * An exclusive resource group implies that there should be no sharing of > + * its allocated resources. At the time this group is considered to be > + * exclusive this test can determine if its current schemata supports this > + * setting by testing for overlap with all other resource groups. > + * > + * Return: 1 if resource group can be exclusive, 0 if there is overlap > + * with allocations of other resource groups and thus this resource group > + * cannot be exclusive. > + */ > +static int rdtgroup_mode_test_exclusive(struct rdtgroup *rdtgrp) Ditto. Thanks, tglx