mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-20 18:21:40 +00:00
62 lines
2.6 KiB
Diff
62 lines
2.6 KiB
Diff
From 65aa71f33891bcf0b75995219e31abaf674c6199 Mon Sep 17 00:00:00 2001
|
|
From: Dirk Buchwalder <buchwalder@posteo.de>
|
|
Date: Sun, 27 Jun 2021 16:52:39 +0200
|
|
Subject: [PATCH 05/12] qca-nss-ecm: resolve the cpu high load regarding ecm
|
|
|
|
If using ECM, cpu load goes up (around 1.0) and stucks there.
|
|
This is due to using uninterruptible sleep function,
|
|
the patch changes this to interruptible sleep function.
|
|
|
|
Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
|
|
---
|
|
frontends/nss/ecm_nss_ipv4.c | 4 ++--
|
|
frontends/nss/ecm_nss_ipv6.c | 4 ++--
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c
|
|
index 5b0ce29..719a747 100644
|
|
--- a/frontends/nss/ecm_nss_ipv4.c
|
|
+++ b/frontends/nss/ecm_nss_ipv4.c
|
|
@@ -697,7 +697,7 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work)
|
|
}
|
|
spin_unlock_bh(&ecm_nss_ipv4_lock);
|
|
|
|
- usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY);
|
|
+ msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000);
|
|
|
|
/*
|
|
* If index is 0, we are starting a new round, but if we still have time remain
|
|
@@ -711,7 +711,7 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work)
|
|
}
|
|
|
|
if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) {
|
|
- msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
|
|
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
|
|
}
|
|
ecm_nss_ipv4_roll_check_jiffies = jiffies;
|
|
ecm_nss_ipv4_next_req_time = ecm_nss_ipv4_roll_check_jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD;
|
|
diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c
|
|
index 8d13f68..67ee364 100644
|
|
--- a/frontends/nss/ecm_nss_ipv6.c
|
|
+++ b/frontends/nss/ecm_nss_ipv6.c
|
|
@@ -675,7 +675,7 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work)
|
|
}
|
|
spin_unlock_bh(&ecm_nss_ipv6_lock);
|
|
|
|
- usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY);
|
|
+ msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000);
|
|
|
|
/*
|
|
* If index is 0, we are starting a new round, but if we still have time remain
|
|
@@ -689,7 +689,7 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work)
|
|
}
|
|
|
|
if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) {
|
|
- msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));
|
|
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));
|
|
}
|
|
ecm_nss_ipv6_roll_check_jiffies = jiffies;
|
|
ecm_nss_ipv6_next_req_time = ecm_nss_ipv6_roll_check_jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD;
|
|
--
|
|
2.34.1
|