Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5427660imm; Tue, 16 Oct 2018 10:04:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV63O18UWqli2F99hAIPD33suMHOM+RgHuazgB3IoN7aIrNpyZuxsmCRX9Exw7jeN5ZRnjx2n X-Received: by 2002:aa7:83cb:: with SMTP id j11-v6mr22900461pfn.91.1539709478138; Tue, 16 Oct 2018 10:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539709478; cv=none; d=google.com; s=arc-20160816; b=ErUePnGXAQGm73mItrvt9O4H0++L4duFsIqjl5eOyOo8vwdqLFY0KP6NNW5IxY+TIq 42I5/tEwCBP+eN2dr8zFEiJQhAapVsEw4G+30Sl2cJlmtWG71FVIYbxAPT36p9KyQCor 6/6z8KOu0iNKbPryowMeiP2ufT+R7aUt9xr3rdqGVYYT/eyvbo+Fc7nCeTV+BHMb7V5u zxITuviBcf6LmECZZQoI89jR6B7zyP+HZlzgNCYNb/cet/F4+0/EVG3KeWlPlZjNeMbl TLwZmFI3lp/LJeFPWSJ/WxbYr6pjq/ydajo7gUMTnwga4CLk1UQX7ozKvWevspSOSm4M z6Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=c464/uXS/PhRL283RHVEV9RttRHf0f0Uexfkue1VVUs=; b=wttaXstVYgmEhBsNhtL8Bl2vXn6I7h6zdHqYqc99UBezeVaTte+L4e9bk4NBEeGR64 by+7aOtlXTFNpOxUyvi/O57W9sKyaHAxrzCbg+SRofzfWvZpL06SsaT6RfzzDAyZnFua SZuAvH6IUSpPcrYIJbHXqcCuqDOtMknZHA/rZcea4Dm01ZMMhZ2WMVeWxRtOZLlbrCoy tePU/faGvvaa13fqBoJggJYCfo0N+DGjfFhXFKHVdDkuYlAtZUqk90tHRXsORbFG+7bX EhL+Vq3TBdE2MLdlr34FXjB/i89ah6MvIAdcawPCGo3nj0SaqmIgFNGq0lopk7+c2qTT x0KQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si14908520pfg.90.2018.10.16.10.04.21; Tue, 16 Oct 2018 10:04: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbeJQAwO (ORCPT + 99 others); Tue, 16 Oct 2018 20:52:14 -0400 Received: from mga17.intel.com ([192.55.52.151]:15627 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbeJQAwO (ORCPT ); Tue, 16 Oct 2018 20:52:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2018 10:00:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,389,1534834800"; d="scan'208";a="100736179" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by orsmga002.jf.intel.com with ESMTP; 16 Oct 2018 10:00:54 -0700 From: Fenghua Yu To: "Thomas Gleixner" , "Ingo Molnar" , "H Peter Anvin" , "Tony Luck" , "Reinette Chatre" , "Peter Zijlstra" , "Moger, Babu" , "James Morse" , "Sai Praneeth Prakhya" , "Arshiya Hayatkhan Pathan" , "Ravi V Shankar" Cc: "linux-kernel" , Fenghua Yu Subject: [PATCH 0/7] selftests/resctrl: Add resctrl selftest Date: Tue, 16 Oct 2018 09:56:34 -0700 Message-Id: <1539709001-38018-1-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With more and more resctrl features are being added by Intel, AMD and ARM, a test tool is becoming more and more useful to validate that both hardware and software functionalities work as expected. We introduce resctrl selftest to cover resctrl features on both X86 and ARM architectures. It first implements MBM (Memory Bandwidth Monitoring) and MBA (Memory Bandwidth Allocation) tests. We can enhance the selftest tool to include more functionality tests in future. The tests are in tools/testing/selftests/resctrl in order to have generic test code for all architectures. Arshiya Hayatkhan Pathan (2): selftests/resctrl: Add mbm test selftests/resctrl: Add mba test Fenghua Yu (1): selftests/resctrl: Add the test in MAINTAINERS Sai Praneeth Prakhya (4): selftests/resctrl: Add basic resctrl file system operations and data selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system selftests/resctrl: Add callback to start a benchmark selftests/resctrl: Add built in benchmark MAINTAINERS | 1 + tools/testing/selftests/resctrl/Makefile | 16 ++ tools/testing/selftests/resctrl/fill_buf.c | 178 ++++++++++++ tools/testing/selftests/resctrl/mba.c | 144 ++++++++++ tools/testing/selftests/resctrl/mbm.c | 113 ++++++++ tools/testing/selftests/resctrl/resctrl.c | 367 ++++++++++++++++++++++++ tools/testing/selftests/resctrl/resctrl.h | 107 +++++++ tools/testing/selftests/resctrl/resctrl_membw.c | 328 +++++++++++++++++++++ tools/testing/selftests/resctrl/resctrl_membw.h | 49 ++++ tools/testing/selftests/resctrl/resctrl_tests.c | 104 +++++++ tools/testing/selftests/resctrl/resctrl_val.c | 192 +++++++++++++ 11 files changed, 1599 insertions(+) create mode 100644 tools/testing/selftests/resctrl/Makefile create mode 100644 tools/testing/selftests/resctrl/fill_buf.c create mode 100644 tools/testing/selftests/resctrl/mba.c create mode 100644 tools/testing/selftests/resctrl/mbm.c create mode 100644 tools/testing/selftests/resctrl/resctrl.c create mode 100644 tools/testing/selftests/resctrl/resctrl.h create mode 100644 tools/testing/selftests/resctrl/resctrl_membw.c create mode 100644 tools/testing/selftests/resctrl/resctrl_membw.h create mode 100644 tools/testing/selftests/resctrl/resctrl_tests.c create mode 100644 tools/testing/selftests/resctrl/resctrl_val.c -- 2.5.0