Skip to content

Commit

Permalink
Added MBA example application
Browse files Browse the repository at this point in the history
- Renamed examples/c/CAT directory to CAT_MBA
- Renamed CAT/allocation_app.c to allocation_app_l3cat.c

Change-Id: I4cc59fcefe09c031e0138d3e738006cc59b37ced
  • Loading branch information
kmabbasi committed Aug 20, 2018
1 parent 1414388 commit 676c890
Show file tree
Hide file tree
Showing 7 changed files with 294 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@ all:
$(MAKE) -C lib
$(MAKE) -C pqos
$(MAKE) -C rdtset
$(MAKE) -C examples/c/CAT
$(MAKE) -C examples/c/CAT_MBA
$(MAKE) -C examples/c/CMT_MBM
$(MAKE) -C examples/c/PSEUDO_LOCK

clean:
$(MAKE) -C lib clean
$(MAKE) -C pqos clean
$(MAKE) -C rdtset clean
$(MAKE) -C examples/c/CAT clean
$(MAKE) -C examples/c/CAT_MBA clean
$(MAKE) -C examples/c/CMT_MBM clean
$(MAKE) -C examples/c/PSEUDO_LOCK clean

style:
$(MAKE) -C lib style
$(MAKE) -C pqos style
$(MAKE) -C rdtset style
$(MAKE) -C examples/c/CAT style
$(MAKE) -C examples/c/CAT_MBA style
$(MAKE) -C examples/c/CMT_MBM style
$(MAKE) -C examples/c/PSEUDO_LOCK style

cppcheck:
$(MAKE) -C lib cppcheck
$(MAKE) -C pqos cppcheck
$(MAKE) -C rdtset cppcheck
$(MAKE) -C examples/c/CAT cppcheck
$(MAKE) -C examples/c/CAT_MBA cppcheck
$(MAKE) -C examples/c/CMT_MBM cppcheck
$(MAKE) -C examples/c/PSEUDO_LOCK cppcheck

Expand Down
14 changes: 8 additions & 6 deletions examples/c/CAT/Makefile → examples/c/CAT_MBA/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,32 @@ CFLAGS += -Wcast-align \
endif

# Build targets and dependencies
ALLOCAPP = allocation_app
ALLOCAPP_L3CAT = allocation_app_l3cat
ALLOCAPP_MBA = allocation_app_mba
ASSOCAPP = association_app
RESETAPP = reset_app

all: $(ALLOCAPP) $(ASSOCAPP) $(RESETAPP)
all: $(ALLOCAPP_L3CAT) $(ALLOCAPP_MBA) $(ASSOCAPP) $(RESETAPP)

$(ALLOCAPP): $(ALLOCAPP).o
$(ALLOCAPP_L3CAT): $(ALLOCAPP_L3CAT).o
$(ALLOCAPP_MBA): $(ALLOCAPP_MBA).o
$(ASSOCAPP): $(ASSOCAPP).o
$(RESETAPP): $(RESETAPP).o

.PHONY: clean
clean:
-rm -f $(ALLOCAPP) $(ASSOCAPP) $(RESETAPP) *.o
-rm -f $(ALLOCAPP_L3CAT) $(ALLOCAPP_MBA) $(ASSOCAPP) $(RESETAPP) *.o

CHECKPATCH?=checkpatch.pl
.PHONY: style
style:
$(CHECKPATCH) --no-tree --no-signoff --emacs \
--ignore CODE_INDENT,INITIALISED_STATIC,LEADING_SPACE,SPLIT_STRING,UNSPECIFIED_INT \
-f allocation_app.c -f association_app.c -f reset_app.c
-f allocation_app_l3cat.c -f allocation_app_mba.c -f association_app.c -f reset_app.c

CPPCHECK?=cppcheck
.PHONY: cppcheck
cppcheck:
$(CPPCHECK) --enable=warning,portability,performance,unusedFunction,missingInclude \
--std=c99 -I$(LIBDIR) --template=gcc \
allocation_app.c association_app.c reset_app.c
allocation_app_l3cat.c allocation_app_mba.c association_app.c reset_app.c
31 changes: 18 additions & 13 deletions examples/c/CAT/README → examples/c/CAT_MBA/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
================================================================================
README for CAT Sample Code
README for CAT and MBA Sample Applications

April 2016
August 2018
================================================================================

CONTENTS
Expand All @@ -18,17 +18,22 @@ OVERVIEW

This is example code to demonstrate the use of PQoS/Intel(R) Resource Director
Technology (Intel(R) RDT) library APIs to manage Cache Allocation Technology
(CAT). Refer to https://github.com/01org/intel-cmt-cat/blob/master/README table
1 for a list of processors supporting CAT. CAT sample application build will
create three targets as follows:
1. allocation_app - Demonstrates usage of PQoS/Intel(R) RDT library APIs
(CAT) and Memory Bandwidth Allocation (MBA).
Refer to https://github.com/01org/intel-cmt-cat/blob/master/README table 1
for a list of processors supporting CAT and MBA. Each sample application
build will create four targets as follows:
1. allocation_app_l3cat - Demonstrates usage of PQoS/Intel(R) RDT library APIs
related to set bit mask for class of service (CLOS) and displaying
class of service (CLOS) and associated bit mask.
2. association_app - Demonstrates usage of PQoS/Intel(R) RDT library APIs
classes of service (CLOS) and associated bit masks.
2. allocation_app_mba - Demonstrates usage of PQoS/Intel(R) RDT library APIs
related to setting MBA delay values for classes of service (CLOS) and displaying
classes of service (CLOS) and associated delay values.
3. association_app - Demonstrates usage of PQoS/Intel(R) RDT library APIs
related to association of class of service (CLOS) to cores and displaying
class of service (CLOS) and core association.
3. reset_app - Demonstrates usage of PQoS/Intel(R) RDT library APIs related to
resetting all classes of service to system default bit mask.
4. reset_app - Demonstrates usage of PQoS/Intel(R) RDT library APIs related to
resetting all classes of service to system default bit masks (CAT) and delay
values (MBA).
All apps operate in user space and use PQoS/Intel(R) RDT and C libraries only.


Expand All @@ -38,8 +43,8 @@ COMPILATION
Note: The PQoS/Intel(R) RDT library should be installed before compilation.

Run "make all" or "make" to compile the programs. If compilation is successful
"allocation_app", "association_app" and "reset_app" binaries should be present
in the directory.
"allocation_app_l3cat", "allocation_app_mba", "association_app" and "reset_app"
binaries should be present in the directory.

Run "make clean" to clean the build files.

Expand All @@ -48,7 +53,7 @@ USAGE
=====

To run:
$ sudo ./allocation_app
$ sudo ./allocation_app_<l3cat/mba>
$ sudo ./association_app
$ sudo ./reset_app

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* BSD LICENSE
*
* Copyright(c) 2014-2016 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit 676c890

Please sign in to comment.