瀏覽代碼

qcacmn: Modify number of buffers in Relay FS

Bring down number of sub buffers in Relay FS from
470 to 255. Earlier 470 buffers were introduced to
maintain 2MB uniformity across platform for relayfs.
But, as IPQ5018 is 512M platform and having 255
buffers is sufficient enough to hold CFR data,
we have brought down the number to 255.

This saves 1MB memory.

Change-Id: Ibbd6926c6712b871e8174e44bd24abf703a8e736
CRs-Fixed: 2855173
Adwait Nayak 4 年之前
父節點
當前提交
c2a2145497
共有 1 個文件被更改,包括 4 次插入20 次删除
  1. 4 20
      target_if/cfr/inc/target_if_cfr_enh.h

+ 4 - 20
target_if/cfr/inc/target_if_cfr_enh.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -138,23 +138,7 @@ enum macrx_freeze_tlv_version {
 	 (MAPLE_MAX_HEADER_LENGTH_WORDS * 4) + \
 	 MAPLE_MAX_DATA_LENGTH_BYTES)
 
-/* The number 470 has come up by considering the 2MB benchmark
- * for Relay FS buffer pool. For Cascade, dakota and HK, the
- * Relay FS buffer pool has been considered as 2MB and based
- * on that the number of sub buffers are 1100, 2200 and 255.
- * For Cypress and pine, since the buffer size has increased
- * to 16K, if we would have considered to keep the relay FS
- * buffer pool size as 2MB then the number of sub buffers /
- * CFR records would have been lesser in number (around 130)
- * So, the decision had been taken to keep the sub buffer
- * count to 255 and as result the relay fs buffer pool size
- * in case of Cypress and Pine exceeded 4MB.
- *
- * In case of Maple, since the Buffer size is small (4470B)
- * we have decided to maintain the relay fs buffer pool size
- * as 2MB, as a result the number of sub buffers has become
- * 470.
- *
+/*
  * RelayFS memory required:
  * Max sub buffer size * Number of sub buffers
  *
@@ -163,10 +147,10 @@ enum macrx_freeze_tlv_version {
  * Hawkeye: (8200B  * 255 ) ~= 2MB
  * Cypress: (16438B * 255 ) ~= 4MB
  * Pine   : (16894B * 255 ) ~= 4MB
- * Maple  : (4470B *  470 ) ~= 2MB
+ * Maple  : (4470B *  255 ) ~= 1MB
  *
  */
-#define STREAMFS_NUM_SUBBUF_MAPLE 470
+#define STREAMFS_NUM_SUBBUF_MAPLE 255
 
 /*
  * @tag: ucode fills this with 0xBA