提交 0dacf6ce 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!20 Add new functions, test examples and refactor.

Merge pull request !20 from liuke20/master
......@@ -7,6 +7,47 @@ Build:
There will be some files under /sys/class/misc/prefetch/
policy: Prefetch policy, can be set to 0~15.
read_unique: Whether to allow cross-numa access to cache. 0--allow 1--forbid.
iocapacity_limit: Whether to limit the io capacity of cache. 0--unlimiet 1--limit.
tag_rep_alg: Choose cache line algorithm. 0--random 1--drrip 2--plru 3--random.
ramswap: Full or partial when doing ramswap. 1--partial 0--full.
sqmerge: whether consecutive address access can occupy only one entry in the squeue to accelerate the merge process. 0--limit 1--merge.
prefetch_drop_hha: Whether to merge a non-prefetch operation with the previous prefetch operation. 0--allow 1--limit.
prime_drop_mask: Enable prefetch to retry randomly. 0--disable 1--enable.
sequence_opt: Whether change the L3T processing to serial mode when blocking. 0--limit 1--enable.
bankintlv: Choose bank interleaving algorithm. 0--simple 1--complex.
prefetch_utl_ddr: The utilization of ddr that leads to the halving the threshold of prefetch. 0--less thean 1/2 1--1/2 2--3/4 3--almost full.
prefetch_utl_ddr_en: Whether to allow the automatic threshold reduction according to the utilization of ddr. 0--forbid 1--allow.
prefetch_utl_l3t: The utilization of l3t that leads to the halving the threshold of prefetch. 0--less thean 1/2 1--1/2 2--3/4 3--almost full.
prefetch_utl_l3t_en: Whether to allow the automatic threshold reduction according to the utilization of l3t. 0--forbid 1--allow.
prefetch_start_level: The number of missing addresses that leads to prefetch. 0--32 1--2 n-1--n, can be 0~31.
totem_dual: Assign the number of totems in each socket. 0--1, 1--2.
canum_sktvec: Vector configuration of chip, active high. Range form 0 to 255.
skt1_tb_cavec: Vector configuration of L3T partition in Socket1 TotemB, active high. Range from 0 to 255.
skt1_ta_cavec: Vector configuration of L3T partition in Socket1 TotemA, active high. Range from 0 to 255.
skt0_tb_cavec: Vector configuration of L3T partition in Socket0 TotemB, active high. Range from 0 to 255.
skt0_ta_cavec: Vector configuration of L3T partition in Socket0 TotemA, active high. Range from 0 to 255.
skt3_tb_cavec: Vector configuration of L3T partition in Socket3 TotemB, active high. Range from 0 to 255.
skt3_ta_cavec: Vector configuration of L3T partition in Socket3 TotemA, active high. Range from 0 to 255.
skt2_tb_cavec: Vector configuration of L3T partition in Socket2 TotemB, active high. Range from 0 to 255.
skt2_ta_cavec: Vector configuration of L3T partition in Socket2 TotemA, active high. Range from 0 to 255.
rdmerge_upgrade_en: Whether to allow the RS to merge with the preceding ReadE. 0--disabl 1--allow.
ddr_compress_opt_en: Optimization switch of support HHA compression access. 0--disable 1--enable.
snpsleep_en: Whether to enable snp sleep. 0--disable 1--enable.
prefetchtgt_en: Whether to enable the prefetchtgt. 0--disable 1--enable.
bankintl_stagger: Simple interleave mode fine-tuning enable. 0--disable --enable.
cpu_pf_lqos_en: Whether to enable the prefetch operation delivered by the CPU to be forcibly processed as the lqos operation. 0--disable 1--enable.
refillsize_com_ada_en: Whether to enable the auto-sensing of the size of the request sent to the HHA. If the size of the continuously received requests is 128 bytes or 64 bytes, the size of the prefetched request is automatically adjusted. 0--disable 1--enable adaptive size adjustment.
refillsize_pre_ada_en: Whether to enable the adaptation of the size of the request sent to the HHA. If the size of the continuously received request is 128 bytes or 64 bytes, the size of the normal request is automatically adjusted. 0--disable 1--enable adaptive size adjustment.
prefetch_overide_level: Initial coverage priority for an operation to enter the prefetch buffer. If the value is incorrect, the threshold is decreased by 1. If the value is correct, the threshold is increased by 1. If the value is 0, the prefetch rule needs to be replaced. range 0~15.
prefetch_vague_en: Indicates whether to enable fuzzy match for prefetch. After the function is enabled, the prefetch summarizes the same 16 KB address rule. The four 4 KB address rules are the same and can be used together. 0--disable 1--enable.
prefetch_core_en: Core prefetch enable; Bit 1 indicates that the core request needs to be prefetched. range 0~15.
prefetch_match_en: Whether to enable the prefetch operation after the prefetch hit. 0--disable 1--enable.
reg_ctrl_prefetch_drop: Prefetch operation discard enable. 0--disable 1--enable.
reg_ctrl_dmcassign: DDR access address alignment enable. 0--The DDR read operation uses the wrap mode, and the address is 32-byte-aligned. The DDR write operation is always in INCR mode, and the address is aligned with the access boundary. 1--The DDR read operation is always in INCR mode, and the address is aligned with the access boundary. The DDR write operation is always in INCR mode, and the address is aligned with the access boundary.
reg_ctrl_rdatabyp: DDR read data bypass memory enable in the HHA. 0--disable 1--The internal data of the HHA is bypassed, and the DDR read data can be transmitted quickly.
reg_dir_replace_alg: Directory replacement algorithm configuration. 0--EDIR random+SDIR random 1--EDIR random+SDIR polling 2--EDIR PLRU+SDIR random 3--EDIR PLRU+SDIR polling
prefetch_comb: Read operation and prefetchtgt merge enable. 0--The read operation can be merged with the fetchtgt operation. 1--The read operation and the fetchtgt merge operation are not allowed.
reg_funcdis_comb: Whether to merge write operations whose size is less than 128 bytes. 0--enable 1--disables the merge function of the write operation.
Configuration example:
echo 1 > /sys/class/misc/prefetch/read_unique
此差异已折叠。
......@@ -12,6 +12,7 @@
* for more details.
* Create: 2020-07-02
* Author: Liqiang (liqiang9102@gitee)
* Liuke20 (liuke20@gitee)
*/
#ifndef __PREFETCH_TUNING__
#define __PREFETCH_TUNING__
......@@ -21,13 +22,215 @@ enum {
ENABLE
};
enum FunctionOrderList {
IOCAPACITY_LIMIT_ORDER = 0,
TAG_REP_ALG_ORDER,
SQMERGE_ORDER,
RDMERGE_ORDER,
PREFETCH_DROP_HHA_ORDER,
RAMSWAP_ORDER,
PRIME_DROP_MASK_ORDER,
SEQUENCE_OPT_ORDER,
BANKINTLV_ORDER,
PREFETCH_ULT_DDR_ORDER,
PREFETCH_ULT_DDR_EN_ORDER,
PREFETCH_ULT_L3T_ORDER,
PREFETCH_UTL_L3T_EN_ORDER,
PREFETCH_START_LEVEL_ORDER,
REG_TOTEM_DUAL_ORDER,
REG_CANUM_SKTVEC_ORDER,
REG_SKT1_TB_CAVEC_ORDER,
REG_SKT1_TA_CAVEC_ORDER,
REG_SKT0_TB_CAVEC_ORDER,
REG_SKT0_TA_CAVEC_ORDER,
REG_SKT3_TB_CAVEC_ORDER,
REG_SKT3_TA_CAVEC_ORDER,
REG_SKT2_TB_CAVEC_ORDER,
REG_SKT2_TA_CAVEC_ORDER,
RDMERGE_UPGRADE_EN_ORDER,
DDR_COMPRESS_OPT_EN_ORDER,
SNPSLEEP_EN_ORDER,
PREFETCHTGT_EN_ORDER,
BANKINTL_STAGGER_ORDER,
CPU_PF_LQOS_EN_ORDER,
REFILLSIZE_COM_ADA_EN_ORDER,
REFILLSIZE_PRE_ADA_EN_ORDER,
PREFETCH_OVERIDE_LEVEL_ORDER,
PREFETCH_VAGUE_EN_ORDER,
PREFETCH_CORE_EN_ORDER,
PREFETCH_MATCH_EN_ORDER,
REG_CTRL_PREFETCH_DROP_ORDER,
REG_CTRL_DMCASSIGN_ORDER,
REG_CTRL_RDATABYP_ORDER,
REG_DIR_REPLACE_ALG_ORDER,
PREFETCH_COMB_ORDER,
REG_FUNCDIS_COMB_ORDER,
DDR_INTLV_SKT_ORDER,
DDR_INTLV_DIE_ORDER,
FUNC_NUM
};
enum RegOffsetList {
L3T_DYNAMIC_CTRL = 0x400,
L3T_STATIC_CTRL = 0x000,
L3T_DYNAMIC_AUCTRL0 = 0x404,
L3T_DYNAMIC_AUCTRL1 = 0x40c,
L3T_PREFETCH = 0x410,
HHA_TOTEMNUM = 0x020,
HHA_CANUM_L = 0x024,
HHA_CANUM_H = 0x028,
HHA_CTRL = 0x000,
HHA_DIR_CTRL = 0x00c,
HHA_FUNC_DIS = 0x010,
AA_MSD1_CTRL = 0x384
};
enum ComMsd1Ctrl {
DDR_INTLV_SKT_START = 29,
DDR_INTLV_SKT_END = 30,
DDR_INTLV_DIE_START = 27,
DDR_INTLV_DIE_END = 27,
};
enum HhaFuncDisReg {
PREFETCH_COMB_START = 21,
PREFETCH_COMB_END = 21,
PREFETCH_FUNCDIS_COMB_START = 2,
PREFETCH_FUNCDIS_COMB_END = 2
};
enum HhaDirCtrlReg {
REG_DIR_REPLACE_ALG_START = 0,
REG_DIR_REPLACE_ALG_END = 1
};
enum HhaCtrlReg {
REG_CTRL_PREFETCH_DROP_START = 6,
REG_CTRL_PREFETCH_DROP_END = 6,
REG_CTRL_DMCASSIGN_START = 5,
REG_CTRL_DMCASSIGN_END = 5,
REG_CTRL_RDATABYP_START = 4,
REG_CTRL_RDATABYP_END = 4
};
enum L3tStaticCtrlReg {
RAMSWAP_START = 16,
RAMSWAP_END = 16
};
enum L3tDynamicAuctrl0Reg {
DDR_COMPRESS_OPT_EN_START = 7,
DDR_COMPRESS_OPT_EN_END = 7,
SNPSLEEP_EN_START = 1,
SNPSLEEP_EN_END = 1,
PREFETCHTGT_EN_START = 0,
PREFETCHTGT_EN_END = 0
};
enum L3tDynamicCtrlReg {
TAG_REP_ALG_START = 0,
TAG_REP_ALG_END = 1,
PREFETCH_DROP_HHA_START = 4,
PREFETCH_DROP_HHA_END = 4,
RDMERGE_UPGRADE_EN_START = 8,
RDMERGE_UPGRADE_EN_END = 8,
RDMERGE_START = 9,
RDMERGE_END = 9,
SQMERGE_START = 10,
SQMERGE_END = 10,
IOCAPACITY_LIMIT_START = 13,
IOCAPACITY_LIMIT_END = 13
};
enum L3tDynamicAuctrl1Reg {
BANKINTLV_START = 0,
BANKINTLV_END = 0,
SEQUENCE_OPT_START = 1,
SEQUENCE_OPT_END = 1,
REFILLSIZE_PRE_ADA_EN_START = 2,
REFILLSIZE_PRE_ADA_EN_END = 2,
REFILLSIZE_COM_ADA_EN_START = 3,
REFILLSIZE_COM_ADA_EN_END = 3,
PRIME_DROP_MASK_START = 5,
PRIME_DROP_MASK_END = 5,
CPU_PF_LQOS_EN_START = 11,
CPU_PF_LQOS_EN_END = 11,
BANKINTL_STAGGER_START = 19,
BANKINTL_STAGGER_END = 19
};
enum L3tPrefetchReg {
PREFETCH_START_LEVEL_START = 0,
PREFETCH_START_LEVEL_END = 4,
PREFETCH_MATCH_EN_START = 7,
PREFETCH_MATCH_EN_END = 7,
PREFETCH_CORE_EN_START = 8,
PREFETCH_CORE_EN_END = 11,
PREFETCH_VAGUE_EN_START = 12,
PREFETCH_VAGUE_EN_END = 12,
PREFETCH_UTL_L3T_EN_START = 13,
PREFETCH_UTL_L3T_EN_END = 13,
PREFETCH_ULT_L3T_START = 14,
PREFETCH_ULT_L3T_END = 15,
PREFETCH_ULT_DDR_EN_START = 16,
PREFETCH_ULT_DDR_EN_END = 16,
PREFETCH_ULT_DDR_START = 17,
PREFETCH_ULT_DDR_END = 18,
PREFETCH_OVERIDE_LEVEL_START = 20,
PREFETCH_OVERIDE_LEVEL_END = 23
};
enum HhaTotemnumReg {
REG_CANUM_SKTVEC_START = 0,
REG_CANUM_SKTVEC_END = 3,
REG_TOTEM_DUAL_START = 4,
REG_TOTEM_DUAL_END = 4
};
enum HhaCanumLReg {
REG_SKT0_TA_CAVEC_START = 0,
REG_SKT0_TA_CAVEC_END = 7,
REG_SKT0_TB_CAVEC_START = 8,
REG_SKT0_TB_CAVEC_END = 15,
REG_SKT1_TA_CAVEC_START = 16,
REG_SKT1_TA_CAVEC_END = 23,
REG_SKT1_TB_CAVEC_START = 24,
REG_SKT1_TB_CAVEC_END = 31
};
enum HhaCanumHReg {
REG_SKT2_TA_CAVEC_START = 0,
REG_SKT2_TA_CAVEC_END = 7,
REG_SKT2_TB_CAVEC_START = 8,
REG_SKT2_TB_CAVEC_END = 15,
REG_SKT3_TA_CAVEC_START = 16,
REG_SKT3_TA_CAVEC_END = 23,
REG_SKT3_TB_CAVEC_START = 24,
REG_SKT3_TB_CAVEC_END = 31
};
#define CACHE_READUNIQ_CTRL (1L << 40)
#define TB_L3T0_BASE 0x90180000
#define L3T_DYNAMIC_CTRL 0x400
#define TOTEM_OFFSET 0x8000000
#define REG_RANGE 0x5000
#define writel_reg(val, addr) (*(volatile unsigned int *)(addr) = (val))
#define readl_reg(addr) (*(volatile unsigned int*)(addr))
#define TB_AA_BASE 0x90300000
#define TB_HHA0_BASE 0x90120000
#define NI_AA_BASE 0x200140000ULL
#define REG_RANGE 0x5000
#define MAX_STR 32
typedef struct {
unsigned long Base;
unsigned long Offset;
unsigned long Address;
int Val;
int StartBit;
int EndBit;
int Glb;
int Sup;
char Name[MAX_STR];
struct mutex* temp_mtx;
} FuncStruct;
#ifdef CONFIG_ARCH_HISI
typedef struct {
......@@ -36,6 +239,7 @@ typedef struct {
long adpp_l1v_mop_el1;
long adps_lld_l3_el1;
} cfg_t;
#else
typedef long cfg_t;
#endif
......@@ -45,14 +249,17 @@ extern void get_prefetch(void* dummy);
extern void read_unique_set(void *dummy);
extern void read_unique_get(void *dummy);
extern void reset_prefetch(void* dummy);
extern void initial_cpu_info(void);
extern int iocapacity_limit_get(void *dummy);
extern void iocapacity_limit_set(void *dummy);
unsigned get_totem_num(void);
unsigned get_nr_skt(void);
extern int initial_cpu_info(void);
extern void set_val(FuncStruct Str);
extern int get_val(FuncStruct Str);
extern int get_default_cfg(int* arr);
extern FuncStruct *get_func(struct device_attribute* attr);
unsigned long get_skt_offset(void);
extern unsigned get_totem_num(void);
extern unsigned get_nr_skt(void);
extern unsigned long get_skt_offset(void);
extern int prefetch_policy_num(void);
extern cfg_t *prefetch_policy(int policy);
extern void reset_default_cfg(int *old_cfg_int);
#endif
此差异已折叠。
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# * Copyright(c) 2019 Huawei Technologies Co., Ltd
# *
# * This program is free software; you can redistribute it and/or modify it
# * under the terms and conditions of the GNU General Public License,
# * version 2, as published by the Free Software Foundation.
# *
# * This program is distributed in the hope it will be useful, but WITHOUT
# * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# * for more details.
# Create: 2020-07-22
# Author: Liuke (liuke20@gitee)
echo "skt2_ta_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt2_ta_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
done
echo "skt2_tb_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt2_tb_cavec
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
done
echo "skt3_ta_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt3_ta_cavec
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
done
echo "skt3_tb_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt3_tb_cavec
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
done
echo "set skt2_ta_cavec to 0: (exp 0, 255, 255, 255)"
echo 0 > /sys/class/misc/prefetch/skt2_ta_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt2_ta_cavec to 128: (exp 128, 255, 255, 255)"
echo 128 > /sys/class/misc/prefetch/skt2_ta_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt2_tb_cavec to 0: (exp 128, 0, 255, 255)"
echo 0 > /sys/class/misc/prefetch/skt2_tb_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt2_tb_cavec to 128: (exp 128, 128, 255, 255)"
echo 128 > /sys/class/misc/prefetch/skt2_tb_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt3_ta_cavec to 0: (exp 128, 128, 0, 255)"
echo 0 > /sys/class/misc/prefetch/skt3_ta_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt3_tb_cavec to 128: (exp 128, 128, 128, 255)"
echo 128 > /sys/class/misc/prefetch/skt3_ta_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt3_tb_cavec to 0: (exp 128, 128, 128, 0)"
echo 0 > /sys/class/misc/prefetch/skt3_tb_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
echo "set skt3_tb_cavec to 128: (exp 128, 128, 128, 128)"
echo 128 > /sys/class/misc/prefetch/skt3_tb_cavec
cat /sys/class/misc/prefetch/skt2_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt2_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt3_tb_cavec | grep register\(1\)
\ No newline at end of file
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# * Copyright(c) 2019 Huawei Technologies Co., Ltd
# *
# * This program is free software; you can redistribute it and/or modify it
# * under the terms and conditions of the GNU General Public License,
# * version 2, as published by the Free Software Foundation.
# *
# * This program is distributed in the hope it will be useful, but WITHOUT
# * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# * for more details.
# Create: 2020-07-22
# Author: Liuke (liuke20@gitee)
echo "skt0_ta_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt0_ta_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
done
echo "skt0_tb_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt0_tb_cavec
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
done
echo "skt1_ta_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt1_ta_cavec
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
done
echo "skt1_tb_cavec set test (exp 0~255) :"
for i in {0..255}
do
echo $i > /sys/class/misc/prefetch/skt1_tb_cavec
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
done
echo "set skt0_ta_cavec to 0: (exp 0, 255, 255, 255)"
echo 0 > /sys/class/misc/prefetch/skt0_ta_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt0_ta_cavec to 128: (exp 128, 255, 255, 255)"
echo 128 > /sys/class/misc/prefetch/skt0_ta_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt0_tb_cavec to 0: (exp 128, 0, 255, 255)"
echo 0 > /sys/class/misc/prefetch/skt0_tb_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt0_tb_cavec to 128: (exp 128, 128, 255, 255)"
echo 128 > /sys/class/misc/prefetch/skt0_tb_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt1_ta_cavec to 0: (exp 128, 128, 0, 255)"
echo 0 > /sys/class/misc/prefetch/skt1_ta_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt0_tb_cavec to 128: (exp 128, 128, 128, 255)"
echo 128 > /sys/class/misc/prefetch/skt1_ta_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt1_tb_cavec to 0: (exp 128, 128, 128, 0)"
echo 0 > /sys/class/misc/prefetch/skt1_tb_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
echo "set skt1_tb_cavec to 128: (exp 128, 128, 128, 128)"
echo 128 > /sys/class/misc/prefetch/skt1_tb_cavec
cat /sys/class/misc/prefetch/skt0_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt0_tb_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_ta_cavec | grep register\(1\)
cat /sys/class/misc/prefetch/skt1_tb_cavec | grep register\(1\)
\ No newline at end of file
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# * Copyright(c) 2019 Huawei Technologies Co., Ltd
# *
# * This program is free software; you can redistribute it and/or modify it
# * under the terms and conditions of the GNU General Public License,
# * version 2, as published by the Free Software Foundation.
# *
# * This program is distributed in the hope it will be useful, but WITHOUT
# * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# * for more details.
# Create: 2020-08-06
# Author: Liuke (liuke20@gitee)
echo "reg_ctrl_prefetch_drop set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/reg_ctrl_prefetch_drop
cat /sys/class/misc/prefetch/reg_ctrl_prefetch_drop | grep register\(1\)
done
echo "reg_ctrl_dmcassign set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/reg_ctrl_dmcassign
cat /sys/class/misc/prefetch/reg_ctrl_dmcassign | grep register\(1\)
done
echo "reg_ctrl_rdatabyp set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/reg_ctrl_rdatabyp
cat /sys/class/misc/prefetch/reg_ctrl_rdatabyp | grep register\(1\)
done
echo "set reg_ctrl_prefetch_drop to be 0: exp(0, 1, 1)"
echo 0 > /sys/class/misc/prefetch/reg_ctrl_prefetch_drop
cat /sys/class/misc/prefetch/reg_ctrl_prefetch_drop | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_dmcassign | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_rdatabyp | grep register\(1\)
echo "set reg_ctrl_dmcassign to be 0: exp(0, 0, 1)"
echo 0 > /sys/class/misc/prefetch/reg_ctrl_dmcassign
cat /sys/class/misc/prefetch/reg_ctrl_prefetch_drop | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_dmcassign | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_rdatabyp | grep register\(1\)
echo "set reg_ctrl_rdatabyp to be 0: exp(0, 0, 0)"
echo 0 > /sys/class/misc/prefetch/reg_ctrl_rdatabyp
cat /sys/class/misc/prefetch/reg_ctrl_prefetch_drop | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_dmcassign | grep register\(1\)
cat /sys/class/misc/prefetch/reg_ctrl_rdatabyp | grep register\(1\)
echo "reg_dir_replace_alg set text (exp 0, 1)"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/reg_dir_replace_alg
cat /sys/class/misc/prefetch/reg_dir_replace_alg | grep register\(1\)
done
\ No newline at end of file
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# * Copyright(c) 2019 Huawei Technologies Co., Ltd
# *
# * This program is free software; you can redistribute it and/or modify it
# * under the terms and conditions of the GNU General Public License,
# * version 2, as published by the Free Software Foundation.
# *
# * This program is distributed in the hope it will be useful, but WITHOUT
# * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# * for more details.
# Create: 2020-08-06
# Author: Liuke (liuke20@gitee)
echo "prefetch_comb set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/prefetch_comb
cat /sys/class/misc/prefetch/prefetch_comb | grep register\(1\)
done
echo "reg_funcdis_comb set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/reg_funcdis_comb
cat /sys/class/misc/prefetch/reg_funcdis_comb | grep register\(1\)
done
echo "set prefetch_comb to be 0: exp(0,1)"
echo 0 > /sys/class/misc/prefetch/prefetch_comb
cat /sys/class/misc/prefetch/prefetch_comb | grep register\(1\)
cat /sys/class/misc/prefetch/reg_funcdis_comb | grep register\(1\)
echo "set reg_funcdis_comb to be 0: exp(0,0)"
echo 0 > /sys/class/misc/prefetch/reg_funcdis_comb
cat /sys/class/misc/prefetch/prefetch_comb | grep register\(1\)
cat /sys/class/misc/prefetch/reg_funcdis_comb | grep register\(1\)
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# * Copyright(c) 2019 Huawei Technologies Co., Ltd
# *
# * This program is free software; you can redistribute it and/or modify it
# * under the terms and conditions of the GNU General Public License,
# * version 2, as published by the Free Software Foundation.
# *
# * This program is distributed in the hope it will be useful, but WITHOUT
# * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# * for more details.
# Create: 2020-07-22
# Author: Liuke (liuke20@gitee)
echo "totem_dual set test (exp 0,1) :"
for i in {0..1}
do
echo $i > /sys/class/misc/prefetch/totem_dual
cat /sys/class/misc/prefetch/totem_dual | grep register\(1\)
done
echo "canum_sktvec set test (exp 0~15) :"
for i in {0..15}
do
echo $i > /sys/class/misc/prefetch/canum_sktvec
cat /sys/class/misc/prefetch/canum_sktvec | grep register\(1\)
done
echo "set totem_dual to 0 (exp 0, 15) :"
echo 0 > /sys/class/misc/prefetch/totem_dual
cat /sys/class/misc/prefetch/totem_dual | grep register\(1\)
cat /sys/class/misc/prefetch/canum_sktvec | grep register\(1\)
echo "set canum_sktvec to 2 (exp 0, 2) :"
echo 2 > /sys/class/misc/prefetch/canum_sktvec
cat /sys/class/misc/prefetch/totem_dual | grep register\(1\)
cat /sys/class/misc/prefetch/canum_sktvec | grep register\(1\)
echo "set canum_sktvec to 8 (exp 0, 8) :"
echo 8 > /sys/class/misc/prefetch/canum_sktvec
cat /sys/class/misc/prefetch/totem_dual | grep register\(1\)
cat /sys/class/misc/prefetch/canum_sktvec | grep register\(1\)
echo "set canum_sktvec to 11 (exp 0, 11) :"
echo 11 > /sys/class/misc/prefetch/canum_sktvec
cat /sys/class/misc/prefetch/totem_dual | grep register\(1\)