linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
@ 2019-10-16 10:37 Rafael J. Wysocki
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-16 10:37 UTC (permalink / raw)
  To: Linux PM; +Cc: Linux ACPI, LKML, Viresh Kumar, Sudeep Holla, Dmitry Osipenko

Hi All,

The motivation for this series is to address the problem discussed here:

https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f

and also reported here:

https://lore.kernel.org/linux-pm/20191015155735.GA29105@bogus/

Plus, generally speaking, using the policy CPU as a proxy for the policy
with respect to PM QoS does not feel particularly straightforward to me
and adds extra complexity.

Anyway, the first patch adds frequency QoS that is based on "raw" PM QoS (kind
of in analogy with device PM QoS) and is just about min and max frequency
requests (no direct relationship to devices).

The second patch switches over cpufreq and its users to the new frequency QoS.
[The Fixes: tag has been tentatively added to it.]

The third one removes frequency request types from device PM QoS.

Unfortunately, the patches are rather big, but also they are quite
straightforward.

I didn't have the time to test this series, so giving it a go would be much
appreciated.

Thanks,
Rafael




^ permalink raw reply	[flat|nested] 34+ messages in thread

* [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
@ 2019-10-16 10:41 ` Rafael J. Wysocki
  2019-10-17  9:41   ` Viresh Kumar
                     ` (3 more replies)
  2019-10-16 10:47 ` [RFT][PATCH 2/3] cpufreq: Use per-policy " Rafael J. Wysocki
                   ` (3 subsequent siblings)
  4 siblings, 4 replies; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-16 10:41 UTC (permalink / raw)
  To: Linux PM; +Cc: Linux ACPI, LKML, Viresh Kumar, Sudeep Holla, Dmitry Osipenko

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Introduce frequency QoS, based on the "raw" low-level PM QoS, to
represent min and max frequency requests and aggregate constraints.

The min and max frequency requests are to be represented by
struct freq_qos_request objects and the aggregate constraints are to
be represented by struct freq_constraints objects.  The latter are
expected to be initialized with the help of freq_constraints_init().

The freq_qos_read_value() helper is defined to retrieve the aggregate
constraints values from a given struct freq_constraints object and
there are the freq_qos_add_request(), freq_qos_update_request() and
freq_qos_remove_request() helpers to manipulate the min and max
frequency requests.  It is assumed that the the helpers will not
run concurrently with each other for the same struct freq_qos_request
object, so if that may be the case, their uses must ensure proper
synchronization between them (e.g. through locking).

In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
are provided to add and remove notifiers that will trigger on aggregate
constraint changes to and from a given struct freq_constraints object,
respectively.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 include/linux/pm_qos.h |   44 ++++++++
 kernel/power/qos.c     |  240 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 284 insertions(+)

Index: linux-pm/include/linux/pm_qos.h
===================================================================
--- linux-pm.orig/include/linux/pm_qos.h
+++ linux-pm/include/linux/pm_qos.h
@@ -267,4 +267,48 @@ static inline s32 dev_pm_qos_raw_resume_
 }
 #endif
 
+#define FREQ_QOS_MIN_DEFAULT_VALUE	0
+#define FREQ_QOS_MAX_DEFAULT_VALUE	(-1)
+
+enum freq_qos_req_type {
+	FREQ_QOS_MIN = 1,
+	FREQ_QOS_MAX,
+};
+
+struct freq_constraints {
+	struct pm_qos_constraints min_freq;
+	struct blocking_notifier_head min_freq_notifiers;
+	struct pm_qos_constraints max_freq;
+	struct blocking_notifier_head max_freq_notifiers;
+};
+
+struct freq_qos_request {
+	enum freq_qos_req_type type;
+	struct plist_node pnode;
+	struct freq_constraints *qos;
+};
+
+static inline int freq_qos_request_active(struct freq_qos_request *req)
+{
+	return !IS_ERR_OR_NULL(req->qos);
+}
+
+void freq_constraints_init(struct freq_constraints *qos);
+
+s32 freq_qos_read_value(struct freq_constraints *qos,
+			enum freq_qos_req_type type);
+
+int freq_qos_add_request(struct freq_constraints *qos,
+			 struct freq_qos_request *req,
+			 enum freq_qos_req_type type, s32 value);
+int freq_qos_update_request(struct freq_qos_request *req, s32 new_value);
+int freq_qos_remove_request(struct freq_qos_request *req);
+
+int freq_qos_add_notifier(struct freq_constraints *qos,
+			  enum freq_qos_req_type type,
+			  struct notifier_block *notifier);
+int freq_qos_remove_notifier(struct freq_constraints *qos,
+			     enum freq_qos_req_type type,
+			     struct notifier_block *notifier);
+
 #endif
Index: linux-pm/kernel/power/qos.c
===================================================================
--- linux-pm.orig/kernel/power/qos.c
+++ linux-pm/kernel/power/qos.c
@@ -650,3 +650,243 @@ static int __init pm_qos_power_init(void
 }
 
 late_initcall(pm_qos_power_init);
+
+/* Definitions related to the frequency QoS below. */
+
+/**
+ * freq_constraints_init - Initialize frequency QoS constraints.
+ * @qos: Frequency QoS constraints to initialize.
+ */
+void freq_constraints_init(struct freq_constraints *qos)
+{
+	struct pm_qos_constraints *c;
+
+	c = &qos->min_freq;
+	plist_head_init(&c->list);
+	c->target_value = FREQ_QOS_MIN_DEFAULT_VALUE;
+	c->default_value = FREQ_QOS_MIN_DEFAULT_VALUE;
+	c->no_constraint_value = FREQ_QOS_MIN_DEFAULT_VALUE;
+	c->type = PM_QOS_MAX;
+	c->notifiers = &qos->min_freq_notifiers;
+	BLOCKING_INIT_NOTIFIER_HEAD(c->notifiers);
+
+	c = &qos->max_freq;
+	plist_head_init(&c->list);
+	c->target_value = FREQ_QOS_MAX_DEFAULT_VALUE;
+	c->default_value = FREQ_QOS_MAX_DEFAULT_VALUE;
+	c->no_constraint_value = FREQ_QOS_MAX_DEFAULT_VALUE;
+	c->type = PM_QOS_MIN;
+	c->notifiers = &qos->max_freq_notifiers;
+	BLOCKING_INIT_NOTIFIER_HEAD(c->notifiers);
+}
+
+/**
+ * freq_qos_read_value - Get frequency QoS constraint for a given list.
+ * @qos: Constraints to evaluate.
+ * @type: QoS request type.
+ */
+s32 freq_qos_read_value(struct freq_constraints *qos,
+			enum freq_qos_req_type type)
+{
+	s32 ret;
+
+	switch (type) {
+	case FREQ_QOS_MIN:
+		ret = IS_ERR_OR_NULL(qos) ?
+			FREQ_QOS_MIN_DEFAULT_VALUE :
+			pm_qos_read_value(&qos->min_freq);
+		break;
+	case FREQ_QOS_MAX:
+		ret = IS_ERR_OR_NULL(qos) ?
+			FREQ_QOS_MAX_DEFAULT_VALUE :
+			pm_qos_read_value(&qos->max_freq);
+		break;
+	default:
+		WARN_ON(1);
+		ret = 0;
+	}
+
+	return ret;
+}
+
+/**
+ * freq_qos_apply - Add/modify/remove frequency QoS request.
+ * @req: Constraint request to apply.
+ * @action: Action to perform (add/update/remove).
+ * @value: Value to assign to the QoS request.
+ */
+static int freq_qos_apply(struct freq_qos_request *req,
+			  enum pm_qos_req_action action, s32 value)
+{
+	int ret;
+
+	switch(req->type) {
+	case FREQ_QOS_MIN:
+		ret = pm_qos_update_target(&req->qos->min_freq, &req->pnode,
+					   action, value);
+		break;
+	case FREQ_QOS_MAX:
+		ret = pm_qos_update_target(&req->qos->max_freq, &req->pnode,
+					   action, value);
+		break;
+	default:
+		ret = -EINVAL;
+	}
+
+	return ret;
+}
+
+/**
+ * freq_qos_add_request - Insert new frequency QoS request into a given list.
+ * @qos: Constraints to update.
+ * @req: Preallocated request object.
+ * @type: Request type.
+ * @value: Request value.
+ *
+ * Insert a new entry into the @qos list of requests, recompute the effective
+ * QoS constraint value for that list and initialize the @req object.  The
+ * caller needs to save that object for later use in updates and removal.
+ *
+ * Return 1 if the effective constraint value has changed, 0 if the effective
+ * constraint value has not changed, or a negative error code on failures.
+ */
+int freq_qos_add_request(struct freq_constraints *qos,
+			 struct freq_qos_request *req,
+			 enum freq_qos_req_type type, s32 value)
+{
+	int ret;
+
+	if (IS_ERR_OR_NULL(qos) || !req)
+		return -EINVAL;
+
+	if (WARN(freq_qos_request_active(req),
+		 "%s() called for active request\n", __func__))
+		return -EINVAL;
+
+	req->qos = qos;
+	req->type = type;
+	ret = freq_qos_apply(req, PM_QOS_ADD_REQ, value);
+	if (ret < 0) {
+		req->qos = NULL;
+		req->type = 0;
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(freq_qos_add_request);
+
+/**
+ * freq_qos_update_request - Modify existing frequency QoS request.
+ * @req: Request to modify.
+ * @new_value: New request value.
+ *
+ * Update an existing frequency QoS request along with the effective constraint
+ * value for the list of requests it belongs to.
+ *
+ * Return 1 if the effective constraint value has changed, 0 if the effective
+ * constraint value has not changed, or a negative error code on failures.
+ */
+int freq_qos_update_request(struct freq_qos_request *req, s32 new_value)
+{
+	if (!req)
+		return -EINVAL;
+
+	if (WARN(!freq_qos_request_active(req),
+		 "%s() called for unknown object\n", __func__))
+		return -EINVAL;
+
+	if (req->pnode.prio == new_value)
+		return 0;
+
+	return freq_qos_apply(req, PM_QOS_UPDATE_REQ, new_value);
+}
+EXPORT_SYMBOL_GPL(freq_qos_update_request);
+
+/**
+ * freq_qos_remove_request - Remove frequency QoS request from its list.
+ * @req: Request to remove.
+ *
+ * Remove the given frequency QoS request from the list of constraints it
+ * belongs to and recompute the effective constraint value for that list.
+ *
+ * Return 1 if the effective constraint value has changed, 0 if the effective
+ * constraint value has not changed, or a negative error code on failures.
+ */
+int freq_qos_remove_request(struct freq_qos_request *req)
+{
+	if (!req)
+		return -EINVAL;
+
+	if (WARN(!freq_qos_request_active(req),
+		 "%s() called for unknown object\n", __func__))
+		return -EINVAL;
+
+	return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
+}
+EXPORT_SYMBOL_GPL(freq_qos_remove_request);
+
+/**
+ * freq_qos_add_notifier - Add frequency QoS change notifier.
+ * @qos: List of requests to add the notifier to.
+ * @type: Request type.
+ * @notifier: Notifier block to add.
+ */
+int freq_qos_add_notifier(struct freq_constraints *qos,
+			  enum freq_qos_req_type type,
+			  struct notifier_block *notifier)
+{
+	int ret;
+
+	if (IS_ERR_OR_NULL(qos) || !notifier)
+		return -EINVAL;
+
+	switch (type) {
+	case FREQ_QOS_MIN:
+		ret = blocking_notifier_chain_register(qos->min_freq.notifiers,
+						       notifier);
+		break;
+	case FREQ_QOS_MAX:
+		ret = blocking_notifier_chain_register(qos->max_freq.notifiers,
+						       notifier);
+		break;
+	default:
+		WARN_ON(1);
+		ret = -EINVAL;
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(freq_qos_add_notifier);
+
+/**
+ * freq_qos_remove_notifier - Remove frequency QoS change notifier.
+ * @qos: List of requests to remove the notifier from.
+ * @type: Request type.
+ * @notifier: Notifier block to remove.
+ */
+int freq_qos_remove_notifier(struct freq_constraints *qos,
+			     enum freq_qos_req_type type,
+			     struct notifier_block *notifier)
+{
+	int ret;
+
+	if (IS_ERR_OR_NULL(qos) || !notifier)
+		return -EINVAL;
+
+	switch (type) {
+	case FREQ_QOS_MIN:
+		ret = blocking_notifier_chain_unregister(qos->min_freq.notifiers,
+							 notifier);
+		break;
+	case FREQ_QOS_MAX:
+		ret = blocking_notifier_chain_unregister(qos->max_freq.notifiers,
+							 notifier);
+		break;
+	default:
+		WARN_ON(1);
+		ret = -EINVAL;
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(freq_qos_remove_notifier);




^ permalink raw reply	[flat|nested] 34+ messages in thread

* [RFT][PATCH 2/3] cpufreq: Use per-policy frequency QoS
  2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
@ 2019-10-16 10:47 ` Rafael J. Wysocki
  2019-10-16 18:01   ` Dmitry Osipenko
  2019-10-16 10:47 ` [RFT][PATCH 3/3] PM: QoS: Drop frequency QoS types from device PM QoS Rafael J. Wysocki
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-16 10:47 UTC (permalink / raw)
  To: Linux PM; +Cc: Linux ACPI, LKML, Viresh Kumar, Sudeep Holla, Dmitry Osipenko

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Replace the CPU device PM QoS used for the management of min and max
frequency constraints in cpufreq (and its users) with per-policy
frequency QoS to avoid problems with cpufreq policies covering
more then one CPU.

Namely, a cpufreq driver is registered with the subsys interface
which calls cpufreq_add_dev() for each CPU, starting from CPU0, so
currently the PM QoS notifiers are added to the first CPU in the
policy (i.e. CPU0 in the majority of cases).

In turn, when the cpufreq driver is unregistered, the subsys interface
doing that calls cpufreq_remove_dev() for each CPU, starting from CPU0,
and the PM QoS notifiers are only removed when cpufreq_remove_dev() is
called for the last CPU in the policy, say CPUx, which as a rule is
not CPU0 if the policy covers more than one CPU.  Then, the PM QoS
notifiers cannot be removed, because CPUx does not have them, and
they are still there in the device PM QoS notifiers list of CPU0,
which prevents new PM QoS notifiers from being registered for CPU0
on the next attempt to register the cpufreq driver.

The same issue occurs when the first CPU in the policy goes offline
before unregistering the driver.

After this change it does not matter which CPU is the policy CPU at
the driver registration time and whether or not it is online all the
time, because the frequency QoS is per policy and not per CPU.

Fixes: 18c49926c4bf ("cpufreq: Add QoS requests for userspace constraints")
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Diagnosed-by: Viresh Kumar <viresh.kumar@linaro.org> 
Link: https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

Applies on top of https://patchwork.kernel.org/patch/11191343/

---
 drivers/acpi/processor_driver.c            |    9 +---
 drivers/acpi/processor_perflib.c           |   18 ++++----
 drivers/acpi/processor_thermal.c           |   18 ++++----
 drivers/cpufreq/cpufreq.c                  |   59 ++++++++++++-----------------
 drivers/cpufreq/intel_pstate.c             |   30 +++++++-------
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c      |   15 +++----
 drivers/macintosh/windfarm_cpufreq_clamp.c |   38 ++++++++++--------
 drivers/thermal/cpu_cooling.c              |   14 +++---
 include/acpi/processor.h                   |   20 ++++-----
 include/linux/cpufreq.h                    |    7 ++-
 10 files changed, 114 insertions(+), 114 deletions(-)

Index: linux-pm/include/linux/cpufreq.h
===================================================================
--- linux-pm.orig/include/linux/cpufreq.h
+++ linux-pm/include/linux/cpufreq.h
@@ -13,6 +13,7 @@
 #include <linux/completion.h>
 #include <linux/kobject.h>
 #include <linux/notifier.h>
+#include <linux/pm_qos.h>
 #include <linux/spinlock.h>
 #include <linux/sysfs.h>
 
@@ -76,8 +77,10 @@ struct cpufreq_policy {
 	struct work_struct	update; /* if update_policy() needs to be
 					 * called, but you're in IRQ context */
 
-	struct dev_pm_qos_request *min_freq_req;
-	struct dev_pm_qos_request *max_freq_req;
+	struct freq_constraints	constraints;
+	struct freq_qos_request	*min_freq_req;
+	struct freq_qos_request	*max_freq_req;
+
 	struct cpufreq_frequency_table	*freq_table;
 	enum cpufreq_table_sorting freq_table_sorted;
 
Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -720,7 +720,7 @@ static ssize_t store_##file_name					\
 	if (ret != 1)							\
 		return -EINVAL;						\
 									\
-	ret = dev_pm_qos_update_request(policy->object##_freq_req, val);\
+	ret = freq_qos_update_request(policy->object##_freq_req, val);\
 	return ret >= 0 ? count : ret;					\
 }
 
@@ -1202,19 +1202,21 @@ static struct cpufreq_policy *cpufreq_po
 		goto err_free_real_cpus;
 	}
 
+	freq_constraints_init(&policy->constraints);
+
 	policy->nb_min.notifier_call = cpufreq_notifier_min;
 	policy->nb_max.notifier_call = cpufreq_notifier_max;
 
-	ret = dev_pm_qos_add_notifier(dev, &policy->nb_min,
-				      DEV_PM_QOS_MIN_FREQUENCY);
+	ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
+				    &policy->nb_min);
 	if (ret) {
 		dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
 			ret, cpumask_pr_args(policy->cpus));
 		goto err_kobj_remove;
 	}
 
-	ret = dev_pm_qos_add_notifier(dev, &policy->nb_max,
-				      DEV_PM_QOS_MAX_FREQUENCY);
+	ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
+				    &policy->nb_max);
 	if (ret) {
 		dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
 			ret, cpumask_pr_args(policy->cpus));
@@ -1232,8 +1234,8 @@ static struct cpufreq_policy *cpufreq_po
 	return policy;
 
 err_min_qos_notifier:
-	dev_pm_qos_remove_notifier(dev, &policy->nb_min,
-				   DEV_PM_QOS_MIN_FREQUENCY);
+	freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MIN,
+				 &policy->nb_min);
 err_kobj_remove:
 	cpufreq_policy_put_kobj(policy);
 err_free_real_cpus:
@@ -1250,7 +1252,6 @@ err_free_policy:
 
 static void cpufreq_policy_free(struct cpufreq_policy *policy)
 {
-	struct device *dev = get_cpu_device(policy->cpu);
 	unsigned long flags;
 	int cpu;
 
@@ -1262,10 +1263,10 @@ static void cpufreq_policy_free(struct c
 		per_cpu(cpufreq_cpu_data, cpu) = NULL;
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
-	dev_pm_qos_remove_notifier(dev, &policy->nb_max,
-				   DEV_PM_QOS_MAX_FREQUENCY);
-	dev_pm_qos_remove_notifier(dev, &policy->nb_min,
-				   DEV_PM_QOS_MIN_FREQUENCY);
+	freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MAX,
+				 &policy->nb_max);
+	freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MIN,
+				 &policy->nb_min);
 
 	if (policy->max_freq_req) {
 		/*
@@ -1274,10 +1275,10 @@ static void cpufreq_policy_free(struct c
 		 */
 		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
 					     CPUFREQ_REMOVE_POLICY, policy);
-		dev_pm_qos_remove_request(policy->max_freq_req);
+		freq_qos_remove_request(policy->max_freq_req);
 	}
 
-	dev_pm_qos_remove_request(policy->min_freq_req);
+	freq_qos_remove_request(policy->min_freq_req);
 	kfree(policy->min_freq_req);
 
 	cpufreq_policy_put_kobj(policy);
@@ -1357,8 +1358,6 @@ static int cpufreq_online(unsigned int c
 	cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
 
 	if (new_policy) {
-		struct device *dev = get_cpu_device(cpu);
-
 		for_each_cpu(j, policy->related_cpus) {
 			per_cpu(cpufreq_cpu_data, j) = policy;
 			add_cpu_dev_symlink(policy, j);
@@ -1369,36 +1368,31 @@ static int cpufreq_online(unsigned int c
 		if (!policy->min_freq_req)
 			goto out_destroy_policy;
 
-		ret = dev_pm_qos_add_request(dev, policy->min_freq_req,
-					     DEV_PM_QOS_MIN_FREQUENCY,
-					     policy->min);
+		ret = freq_qos_add_request(&policy->constraints,
+					   policy->min_freq_req, FREQ_QOS_MIN,
+					   policy->min);
 		if (ret < 0) {
 			/*
-			 * So we don't call dev_pm_qos_remove_request() for an
+			 * So we don't call freq_qos_remove_request() for an
 			 * uninitialized request.
 			 */
 			kfree(policy->min_freq_req);
 			policy->min_freq_req = NULL;
-
-			dev_err(dev, "Failed to add min-freq constraint (%d)\n",
-				ret);
 			goto out_destroy_policy;
 		}
 
 		/*
 		 * This must be initialized right here to avoid calling
-		 * dev_pm_qos_remove_request() on uninitialized request in case
+		 * freq_qos_remove_request() on uninitialized request in case
 		 * of errors.
 		 */
 		policy->max_freq_req = policy->min_freq_req + 1;
 
-		ret = dev_pm_qos_add_request(dev, policy->max_freq_req,
-					     DEV_PM_QOS_MAX_FREQUENCY,
-					     policy->max);
+		ret = freq_qos_add_request(&policy->constraints,
+					   policy->max_freq_req, FREQ_QOS_MAX,
+					   policy->max);
 		if (ret < 0) {
 			policy->max_freq_req = NULL;
-			dev_err(dev, "Failed to add max-freq constraint (%d)\n",
-				ret);
 			goto out_destroy_policy;
 		}
 
@@ -2374,7 +2368,6 @@ int cpufreq_set_policy(struct cpufreq_po
 		       struct cpufreq_policy *new_policy)
 {
 	struct cpufreq_governor *old_gov;
-	struct device *cpu_dev = get_cpu_device(policy->cpu);
 	int ret;
 
 	pr_debug("setting new policy for CPU %u: %u - %u kHz\n",
@@ -2386,8 +2379,8 @@ int cpufreq_set_policy(struct cpufreq_po
 	 * PM QoS framework collects all the requests from users and provide us
 	 * the final aggregated value here.
 	 */
-	new_policy->min = dev_pm_qos_read_value(cpu_dev, DEV_PM_QOS_MIN_FREQUENCY);
-	new_policy->max = dev_pm_qos_read_value(cpu_dev, DEV_PM_QOS_MAX_FREQUENCY);
+	new_policy->min = freq_qos_read_value(&policy->constraints, FREQ_QOS_MIN);
+	new_policy->max = freq_qos_read_value(&policy->constraints, FREQ_QOS_MAX);
 
 	/* verify the cpu speed can be set within this limit */
 	ret = cpufreq_driver->verify(new_policy);
@@ -2518,7 +2511,7 @@ static int cpufreq_boost_set_sw(int stat
 			break;
 		}
 
-		ret = dev_pm_qos_update_request(policy->max_freq_req, policy->max);
+		ret = freq_qos_update_request(policy->max_freq_req, policy->max);
 		if (ret < 0)
 			break;
 	}
Index: linux-pm/drivers/cpufreq/intel_pstate.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/intel_pstate.c
+++ linux-pm/drivers/cpufreq/intel_pstate.c
@@ -1088,10 +1088,10 @@ static ssize_t store_no_turbo(struct kob
 
 static struct cpufreq_driver intel_pstate;
 
-static void update_qos_request(enum dev_pm_qos_req_type type)
+static void update_qos_request(enum freq_qos_req_type type)
 {
 	int max_state, turbo_max, freq, i, perf_pct;
-	struct dev_pm_qos_request *req;
+	struct freq_qos_request *req;
 	struct cpufreq_policy *policy;
 
 	for_each_possible_cpu(i) {
@@ -1112,7 +1112,7 @@ static void update_qos_request(enum dev_
 		else
 			turbo_max = cpu->pstate.turbo_pstate;
 
-		if (type == DEV_PM_QOS_MIN_FREQUENCY) {
+		if (type == FREQ_QOS_MIN) {
 			perf_pct = global.min_perf_pct;
 		} else {
 			req++;
@@ -1122,7 +1122,7 @@ static void update_qos_request(enum dev_
 		freq = DIV_ROUND_UP(turbo_max * perf_pct, 100);
 		freq *= cpu->pstate.scaling;
 
-		if (dev_pm_qos_update_request(req, freq) < 0)
+		if (freq_qos_update_request(req, freq) < 0)
 			pr_warn("Failed to update freq constraint: CPU%d\n", i);
 	}
 }
@@ -1153,7 +1153,7 @@ static ssize_t store_max_perf_pct(struct
 	if (intel_pstate_driver == &intel_pstate)
 		intel_pstate_update_policies();
 	else
-		update_qos_request(DEV_PM_QOS_MAX_FREQUENCY);
+		update_qos_request(FREQ_QOS_MAX);
 
 	mutex_unlock(&intel_pstate_driver_lock);
 
@@ -1187,7 +1187,7 @@ static ssize_t store_min_perf_pct(struct
 	if (intel_pstate_driver == &intel_pstate)
 		intel_pstate_update_policies();
 	else
-		update_qos_request(DEV_PM_QOS_MIN_FREQUENCY);
+		update_qos_request(FREQ_QOS_MIN);
 
 	mutex_unlock(&intel_pstate_driver_lock);
 
@@ -2381,7 +2381,7 @@ static unsigned int intel_cpufreq_fast_s
 static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
 {
 	int max_state, turbo_max, min_freq, max_freq, ret;
-	struct dev_pm_qos_request *req;
+	struct freq_qos_request *req;
 	struct cpudata *cpu;
 	struct device *dev;
 
@@ -2416,15 +2416,15 @@ static int intel_cpufreq_cpu_init(struct
 	max_freq = DIV_ROUND_UP(turbo_max * global.max_perf_pct, 100);
 	max_freq *= cpu->pstate.scaling;
 
-	ret = dev_pm_qos_add_request(dev, req, DEV_PM_QOS_MIN_FREQUENCY,
-				     min_freq);
+	ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MIN,
+				   min_freq);
 	if (ret < 0) {
 		dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret);
 		goto free_req;
 	}
 
-	ret = dev_pm_qos_add_request(dev, req + 1, DEV_PM_QOS_MAX_FREQUENCY,
-				     max_freq);
+	ret = freq_qos_add_request(&policy->constraints, req + 1, FREQ_QOS_MAX,
+				   max_freq);
 	if (ret < 0) {
 		dev_err(dev, "Failed to add max-freq constraint (%d)\n", ret);
 		goto remove_min_req;
@@ -2435,7 +2435,7 @@ static int intel_cpufreq_cpu_init(struct
 	return 0;
 
 remove_min_req:
-	dev_pm_qos_remove_request(req);
+	freq_qos_remove_request(req);
 free_req:
 	kfree(req);
 pstate_exit:
@@ -2446,12 +2446,12 @@ pstate_exit:
 
 static int intel_cpufreq_cpu_exit(struct cpufreq_policy *policy)
 {
-	struct dev_pm_qos_request *req;
+	struct freq_qos_request *req;
 
 	req = policy->driver_data;
 
-	dev_pm_qos_remove_request(req + 1);
-	dev_pm_qos_remove_request(req);
+	freq_qos_remove_request(req + 1);
+	freq_qos_remove_request(req);
 	kfree(req);
 
 	return intel_pstate_cpu_exit(policy);
Index: linux-pm/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
+++ linux-pm/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
@@ -65,7 +65,7 @@ EXPORT_SYMBOL_GPL(cbe_cpufreq_set_pmode_
 static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
 {
 	struct cpufreq_policy *policy;
-	struct dev_pm_qos_request *req;
+	struct freq_qos_request *req;
 	u8 node, slow_mode;
 	int cpu, ret;
 
@@ -86,7 +86,7 @@ static void cbe_cpufreq_handle_pmi(pmi_m
 
 	req = policy->driver_data;
 
-	ret = dev_pm_qos_update_request(req,
+	ret = freq_qos_update_request(req,
 			policy->freq_table[slow_mode].frequency);
 	if (ret < 0)
 		pr_warn("Failed to update freq constraint: %d\n", ret);
@@ -103,7 +103,7 @@ static struct pmi_handler cbe_pmi_handle
 
 void cbe_cpufreq_pmi_policy_init(struct cpufreq_policy *policy)
 {
-	struct dev_pm_qos_request *req;
+	struct freq_qos_request *req;
 	int ret;
 
 	if (!cbe_cpufreq_has_pmi)
@@ -113,9 +113,8 @@ void cbe_cpufreq_pmi_policy_init(struct
 	if (!req)
 		return;
 
-	ret = dev_pm_qos_add_request(get_cpu_device(policy->cpu), req,
-				     DEV_PM_QOS_MAX_FREQUENCY,
-				     policy->freq_table[0].frequency);
+	ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MAX,
+				   policy->freq_table[0].frequency);
 	if (ret < 0) {
 		pr_err("Failed to add freq constraint (%d)\n", ret);
 		kfree(req);
@@ -128,10 +127,10 @@ EXPORT_SYMBOL_GPL(cbe_cpufreq_pmi_policy
 
 void cbe_cpufreq_pmi_policy_exit(struct cpufreq_policy *policy)
 {
-	struct dev_pm_qos_request *req = policy->driver_data;
+	struct freq_qos_request *req = policy->driver_data;
 
 	if (cbe_cpufreq_has_pmi) {
-		dev_pm_qos_remove_request(req);
+		freq_qos_remove_request(req);
 		kfree(req);
 	}
 }
Index: linux-pm/include/acpi/processor.h
===================================================================
--- linux-pm.orig/include/acpi/processor.h
+++ linux-pm/include/acpi/processor.h
@@ -232,8 +232,8 @@ struct acpi_processor {
 	struct acpi_processor_limit limit;
 	struct thermal_cooling_device *cdev;
 	struct device *dev; /* Processor device. */
-	struct dev_pm_qos_request perflib_req;
-	struct dev_pm_qos_request thermal_req;
+	struct freq_qos_request perflib_req;
+	struct freq_qos_request thermal_req;
 };
 
 struct acpi_processor_errata {
@@ -302,8 +302,8 @@ static inline void acpi_processor_ffh_cs
 #ifdef CONFIG_CPU_FREQ
 extern bool acpi_processor_cpufreq_init;
 void acpi_processor_ignore_ppc_init(void);
-void acpi_processor_ppc_init(int cpu);
-void acpi_processor_ppc_exit(int cpu);
+void acpi_processor_ppc_init(struct cpufreq_policy *policy);
+void acpi_processor_ppc_exit(struct cpufreq_policy *policy);
 void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag);
 extern int acpi_processor_get_bios_limit(int cpu, unsigned int *limit);
 #else
@@ -311,11 +311,11 @@ static inline void acpi_processor_ignore
 {
 	return;
 }
-static inline void acpi_processor_ppc_init(int cpu)
+static inline void acpi_processor_ppc_init(struct cpufreq_policy *policy)
 {
 	return;
 }
-static inline void acpi_processor_ppc_exit(int cpu)
+static inline void acpi_processor_ppc_exit(struct cpufreq_policy *policy)
 {
 	return;
 }
@@ -431,14 +431,14 @@ static inline int acpi_processor_hotplug
 int acpi_processor_get_limit_info(struct acpi_processor *pr);
 extern const struct thermal_cooling_device_ops processor_cooling_ops;
 #if defined(CONFIG_ACPI_CPU_FREQ_PSS) & defined(CONFIG_CPU_FREQ)
-void acpi_thermal_cpufreq_init(int cpu);
-void acpi_thermal_cpufreq_exit(int cpu);
+void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy);
+void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy);
 #else
-static inline void acpi_thermal_cpufreq_init(int cpu)
+static inline void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy)
 {
 	return;
 }
-static inline void acpi_thermal_cpufreq_exit(int cpu)
+static inline void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
 {
 	return;
 }
Index: linux-pm/drivers/acpi/processor_driver.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_driver.c
+++ linux-pm/drivers/acpi/processor_driver.c
@@ -290,14 +290,13 @@ static int acpi_processor_notifier(struc
 				   unsigned long event, void *data)
 {
 	struct cpufreq_policy *policy = data;
-	int cpu = policy->cpu;
 
 	if (event == CPUFREQ_CREATE_POLICY) {
-		acpi_thermal_cpufreq_init(cpu);
-		acpi_processor_ppc_init(cpu);
+		acpi_thermal_cpufreq_init(policy);
+		acpi_processor_ppc_init(policy);
 	} else if (event == CPUFREQ_REMOVE_POLICY) {
-		acpi_processor_ppc_exit(cpu);
-		acpi_thermal_cpufreq_exit(cpu);
+		acpi_processor_ppc_exit(policy);
+		acpi_thermal_cpufreq_exit(policy);
 	}
 
 	return 0;
Index: linux-pm/drivers/acpi/processor_perflib.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_perflib.c
+++ linux-pm/drivers/acpi/processor_perflib.c
@@ -81,10 +81,10 @@ static int acpi_processor_get_platform_l
 	pr->performance_platform_limit = (int)ppc;
 
 	if (ppc >= pr->performance->state_count ||
-	    unlikely(!dev_pm_qos_request_active(&pr->perflib_req)))
+	    unlikely(!freq_qos_request_active(&pr->perflib_req)))
 		return 0;
 
-	ret = dev_pm_qos_update_request(&pr->perflib_req,
+	ret = freq_qos_update_request(&pr->perflib_req,
 			pr->performance->states[ppc].core_frequency * 1000);
 	if (ret < 0) {
 		pr_warn("Failed to update perflib freq constraint: CPU%d (%d)\n",
@@ -157,28 +157,28 @@ void acpi_processor_ignore_ppc_init(void
 		ignore_ppc = 0;
 }
 
-void acpi_processor_ppc_init(int cpu)
+void acpi_processor_ppc_init(struct cpufreq_policy *policy)
 {
+	int cpu = policy->cpu;
 	struct acpi_processor *pr = per_cpu(processors, cpu);
 	int ret;
 
 	if (!pr)
 		return;
 
-	ret = dev_pm_qos_add_request(get_cpu_device(cpu),
-				     &pr->perflib_req, DEV_PM_QOS_MAX_FREQUENCY,
-				     INT_MAX);
+	ret = freq_qos_add_request(&policy->constraints, &pr->perflib_req,
+				   FREQ_QOS_MAX, INT_MAX);
 	if (ret < 0)
 		pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
 		       ret);
 }
 
-void acpi_processor_ppc_exit(int cpu)
+void acpi_processor_ppc_exit(struct cpufreq_policy *policy)
 {
-	struct acpi_processor *pr = per_cpu(processors, cpu);
+	struct acpi_processor *pr = per_cpu(processors, policy->cpu);
 
 	if (pr)
-		dev_pm_qos_remove_request(&pr->perflib_req);
+		freq_qos_remove_request(&pr->perflib_req);
 }
 
 static int acpi_processor_get_performance_control(struct acpi_processor *pr)
Index: linux-pm/drivers/acpi/processor_thermal.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_thermal.c
+++ linux-pm/drivers/acpi/processor_thermal.c
@@ -105,7 +105,7 @@ static int cpufreq_set_cur_state(unsigne
 
 		pr = per_cpu(processors, i);
 
-		if (unlikely(!dev_pm_qos_request_active(&pr->thermal_req)))
+		if (unlikely(!freq_qos_request_active(&pr->thermal_req)))
 			continue;
 
 		policy = cpufreq_cpu_get(i);
@@ -116,7 +116,7 @@ static int cpufreq_set_cur_state(unsigne
 
 		cpufreq_cpu_put(policy);
 
-		ret = dev_pm_qos_update_request(&pr->thermal_req, max_freq);
+		ret = freq_qos_update_request(&pr->thermal_req, max_freq);
 		if (ret < 0) {
 			pr_warn("Failed to update thermal freq constraint: CPU%d (%d)\n",
 				pr->id, ret);
@@ -125,28 +125,28 @@ static int cpufreq_set_cur_state(unsigne
 	return 0;
 }
 
-void acpi_thermal_cpufreq_init(int cpu)
+void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy)
 {
+	int cpu = policy->cpu;
 	struct acpi_processor *pr = per_cpu(processors, cpu);
 	int ret;
 
 	if (!pr)
 		return;
 
-	ret = dev_pm_qos_add_request(get_cpu_device(cpu),
-				     &pr->thermal_req, DEV_PM_QOS_MAX_FREQUENCY,
-				     INT_MAX);
+	ret = freq_qos_add_request(&policy->constraints, &pr->thermal_req,
+				   FREQ_QOS_MAX, INT_MAX);
 	if (ret < 0)
 		pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
 		       ret);
 }
 
-void acpi_thermal_cpufreq_exit(int cpu)
+void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
 {
-	struct acpi_processor *pr = per_cpu(processors, cpu);
+	struct acpi_processor *pr = per_cpu(processors, policy->cpu);
 
 	if (pr)
-		dev_pm_qos_remove_request(&pr->thermal_req);
+		freq_qos_remove_request(&pr->thermal_req);
 }
 #else				/* ! CONFIG_CPU_FREQ */
 static int cpufreq_get_max_state(unsigned int cpu)
Index: linux-pm/drivers/thermal/cpu_cooling.c
===================================================================
--- linux-pm.orig/drivers/thermal/cpu_cooling.c
+++ linux-pm/drivers/thermal/cpu_cooling.c
@@ -88,7 +88,7 @@ struct cpufreq_cooling_device {
 	struct cpufreq_policy *policy;
 	struct list_head node;
 	struct time_in_idle *idle_time;
-	struct dev_pm_qos_request qos_req;
+	struct freq_qos_request qos_req;
 };
 
 static DEFINE_IDA(cpufreq_ida);
@@ -331,7 +331,7 @@ static int cpufreq_set_cur_state(struct
 
 	cpufreq_cdev->cpufreq_state = state;
 
-	return dev_pm_qos_update_request(&cpufreq_cdev->qos_req,
+	return freq_qos_update_request(&cpufreq_cdev->qos_req,
 				cpufreq_cdev->freq_table[state].frequency);
 }
 
@@ -615,9 +615,9 @@ __cpufreq_cooling_register(struct device
 		cooling_ops = &cpufreq_cooling_ops;
 	}
 
-	ret = dev_pm_qos_add_request(dev, &cpufreq_cdev->qos_req,
-				     DEV_PM_QOS_MAX_FREQUENCY,
-				     cpufreq_cdev->freq_table[0].frequency);
+	ret = freq_qos_add_request(&policy->constraints,
+				   &cpufreq_cdev->qos_req, FREQ_QOS_MAX,
+				   cpufreq_cdev->freq_table[0].frequency);
 	if (ret < 0) {
 		pr_err("%s: Failed to add freq constraint (%d)\n", __func__,
 		       ret);
@@ -637,7 +637,7 @@ __cpufreq_cooling_register(struct device
 	return cdev;
 
 remove_qos_req:
-	dev_pm_qos_remove_request(&cpufreq_cdev->qos_req);
+	freq_qos_remove_request(&cpufreq_cdev->qos_req);
 remove_ida:
 	ida_simple_remove(&cpufreq_ida, cpufreq_cdev->id);
 free_table:
@@ -736,7 +736,7 @@ void cpufreq_cooling_unregister(struct t
 	mutex_unlock(&cooling_list_lock);
 
 	thermal_cooling_device_unregister(cdev);
-	dev_pm_qos_remove_request(&cpufreq_cdev->qos_req);
+	freq_qos_remove_request(&cpufreq_cdev->qos_req);
 	ida_simple_remove(&cpufreq_ida, cpufreq_cdev->id);
 	kfree(cpufreq_cdev->idle_time);
 	kfree(cpufreq_cdev->freq_table);
Index: linux-pm/drivers/macintosh/windfarm_cpufreq_clamp.c
===================================================================
--- linux-pm.orig/drivers/macintosh/windfarm_cpufreq_clamp.c
+++ linux-pm/drivers/macintosh/windfarm_cpufreq_clamp.c
@@ -18,7 +18,7 @@
 
 static int clamped;
 static struct wf_control *clamp_control;
-static struct dev_pm_qos_request qos_req;
+static struct freq_qos_request qos_req;
 static unsigned int min_freq, max_freq;
 
 static int clamp_set(struct wf_control *ct, s32 value)
@@ -35,7 +35,7 @@ static int clamp_set(struct wf_control *
 	}
 	clamped = value;
 
-	return dev_pm_qos_update_request(&qos_req, freq);
+	return freq_qos_update_request(&qos_req, freq);
 }
 
 static int clamp_get(struct wf_control *ct, s32 *value)
@@ -77,38 +77,44 @@ static int __init wf_cpufreq_clamp_init(
 
 	min_freq = policy->cpuinfo.min_freq;
 	max_freq = policy->cpuinfo.max_freq;
+
+	ret = freq_qos_add_request(&policy->constraints, &qos_req, FREQ_QOS_MAX,
+				   max_freq);
+
 	cpufreq_cpu_put(policy);
 
+	if (ret < 0) {
+		pr_err("%s: Failed to add freq constraint (%d)\n", __func__,
+		       ret);
+		return ret;
+	}
+
 	dev = get_cpu_device(0);
 	if (unlikely(!dev)) {
 		pr_warn("%s: No cpu device for cpu0\n", __func__);
-		return -ENODEV;
+		ret = -ENODEV;
+		goto fail;
 	}
 
 	clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL);
-	if (clamp == NULL)
-		return -ENOMEM;
-
-	ret = dev_pm_qos_add_request(dev, &qos_req, DEV_PM_QOS_MAX_FREQUENCY,
-				     max_freq);
-	if (ret < 0) {
-		pr_err("%s: Failed to add freq constraint (%d)\n", __func__,
-		       ret);
-		goto free;
+	if (clamp == NULL) {
+		ret = -ENOMEM;
+		goto fail;
 	}
 
 	clamp->ops = &clamp_ops;
 	clamp->name = "cpufreq-clamp";
 	ret = wf_register_control(clamp);
 	if (ret)
-		goto fail;
+		goto free;
+
 	clamp_control = clamp;
 	return 0;
- fail:
-	dev_pm_qos_remove_request(&qos_req);
 
  free:
 	kfree(clamp);
+ fail:
+	freq_qos_remove_request(&qos_req);
 	return ret;
 }
 
@@ -116,7 +122,7 @@ static void __exit wf_cpufreq_clamp_exit
 {
 	if (clamp_control) {
 		wf_unregister_control(clamp_control);
-		dev_pm_qos_remove_request(&qos_req);
+		freq_qos_remove_request(&qos_req);
 	}
 }
 




^ permalink raw reply	[flat|nested] 34+ messages in thread

* [RFT][PATCH 3/3] PM: QoS: Drop frequency QoS types from device PM QoS
  2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
  2019-10-16 10:47 ` [RFT][PATCH 2/3] cpufreq: Use per-policy " Rafael J. Wysocki
@ 2019-10-16 10:47 ` Rafael J. Wysocki
  2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
  2019-10-17  9:46 ` Viresh Kumar
  4 siblings, 0 replies; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-16 10:47 UTC (permalink / raw)
  To: Linux PM; +Cc: Linux ACPI, LKML, Viresh Kumar, Sudeep Holla, Dmitry Osipenko

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

There are no more active users of DEV_PM_QOS_MIN_FREQUENCY and
DEV_PM_QOS_MAX_FREQUENCY device PM QoS request types, so drop them
along with the code supporting them.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/base/power/qos.c |   70 +----------------------------------------------
 include/linux/pm_qos.h   |    8 -----
 2 files changed, 2 insertions(+), 76 deletions(-)

Index: linux-pm/include/linux/pm_qos.h
===================================================================
--- linux-pm.orig/include/linux/pm_qos.h
+++ linux-pm/include/linux/pm_qos.h
@@ -34,8 +34,6 @@ enum pm_qos_flags_status {
 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT	PM_QOS_LATENCY_ANY
 #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS	PM_QOS_LATENCY_ANY_NS
 #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE	0
-#define PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE	0
-#define PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE	(-1)
 #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT	(-1)
 
 #define PM_QOS_FLAG_NO_POWER_OFF	(1 << 0)
@@ -54,8 +52,6 @@ struct pm_qos_flags_request {
 enum dev_pm_qos_req_type {
 	DEV_PM_QOS_RESUME_LATENCY = 1,
 	DEV_PM_QOS_LATENCY_TOLERANCE,
-	DEV_PM_QOS_MIN_FREQUENCY,
-	DEV_PM_QOS_MAX_FREQUENCY,
 	DEV_PM_QOS_FLAGS,
 };
 
@@ -97,14 +93,10 @@ struct pm_qos_flags {
 struct dev_pm_qos {
 	struct pm_qos_constraints resume_latency;
 	struct pm_qos_constraints latency_tolerance;
-	struct pm_qos_constraints min_frequency;
-	struct pm_qos_constraints max_frequency;
 	struct pm_qos_flags flags;
 	struct dev_pm_qos_request *resume_latency_req;
 	struct dev_pm_qos_request *latency_tolerance_req;
 	struct dev_pm_qos_request *flags_req;
-	struct dev_pm_qos_request *min_frequency_req;
-	struct dev_pm_qos_request *max_frequency_req;
 };
 
 /* Action requested to pm_qos_update_target */
Index: linux-pm/drivers/base/power/qos.c
===================================================================
--- linux-pm.orig/drivers/base/power/qos.c
+++ linux-pm/drivers/base/power/qos.c
@@ -115,20 +115,10 @@ s32 dev_pm_qos_read_value(struct device
 
 	spin_lock_irqsave(&dev->power.lock, flags);
 
-	switch (type) {
-	case DEV_PM_QOS_RESUME_LATENCY:
+	if (type == DEV_PM_QOS_RESUME_LATENCY) {
 		ret = IS_ERR_OR_NULL(qos) ? PM_QOS_RESUME_LATENCY_NO_CONSTRAINT
 			: pm_qos_read_value(&qos->resume_latency);
-		break;
-	case DEV_PM_QOS_MIN_FREQUENCY:
-		ret = IS_ERR_OR_NULL(qos) ? PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE
-			: pm_qos_read_value(&qos->min_frequency);
-		break;
-	case DEV_PM_QOS_MAX_FREQUENCY:
-		ret = IS_ERR_OR_NULL(qos) ? PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE
-			: pm_qos_read_value(&qos->max_frequency);
-		break;
-	default:
+	} else {
 		WARN_ON(1);
 		ret = 0;
 	}
@@ -169,14 +159,6 @@ static int apply_constraint(struct dev_p
 			req->dev->power.set_latency_tolerance(req->dev, value);
 		}
 		break;
-	case DEV_PM_QOS_MIN_FREQUENCY:
-		ret = pm_qos_update_target(&qos->min_frequency,
-					   &req->data.pnode, action, value);
-		break;
-	case DEV_PM_QOS_MAX_FREQUENCY:
-		ret = pm_qos_update_target(&qos->max_frequency,
-					   &req->data.pnode, action, value);
-		break;
 	case DEV_PM_QOS_FLAGS:
 		ret = pm_qos_update_flags(&qos->flags, &req->data.flr,
 					  action, value);
@@ -227,24 +209,6 @@ static int dev_pm_qos_constraints_alloca
 	c->no_constraint_value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
 	c->type = PM_QOS_MIN;
 
-	c = &qos->min_frequency;
-	plist_head_init(&c->list);
-	c->target_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
-	c->default_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
-	c->no_constraint_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
-	c->type = PM_QOS_MAX;
-	c->notifiers = ++n;
-	BLOCKING_INIT_NOTIFIER_HEAD(n);
-
-	c = &qos->max_frequency;
-	plist_head_init(&c->list);
-	c->target_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
-	c->default_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
-	c->no_constraint_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
-	c->type = PM_QOS_MIN;
-	c->notifiers = ++n;
-	BLOCKING_INIT_NOTIFIER_HEAD(n);
-
 	INIT_LIST_HEAD(&qos->flags.list);
 
 	spin_lock_irq(&dev->power.lock);
@@ -305,18 +269,6 @@ void dev_pm_qos_constraints_destroy(stru
 		memset(req, 0, sizeof(*req));
 	}
 
-	c = &qos->min_frequency;
-	plist_for_each_entry_safe(req, tmp, &c->list, data.pnode) {
-		apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE);
-		memset(req, 0, sizeof(*req));
-	}
-
-	c = &qos->max_frequency;
-	plist_for_each_entry_safe(req, tmp, &c->list, data.pnode) {
-		apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE);
-		memset(req, 0, sizeof(*req));
-	}
-
 	f = &qos->flags;
 	list_for_each_entry_safe(req, tmp, &f->list, data.flr.node) {
 		apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
@@ -428,8 +380,6 @@ static int __dev_pm_qos_update_request(s
 	switch(req->type) {
 	case DEV_PM_QOS_RESUME_LATENCY:
 	case DEV_PM_QOS_LATENCY_TOLERANCE:
-	case DEV_PM_QOS_MIN_FREQUENCY:
-	case DEV_PM_QOS_MAX_FREQUENCY:
 		curr_value = req->data.pnode.prio;
 		break;
 	case DEV_PM_QOS_FLAGS:
@@ -557,14 +507,6 @@ int dev_pm_qos_add_notifier(struct devic
 		ret = blocking_notifier_chain_register(dev->power.qos->resume_latency.notifiers,
 						       notifier);
 		break;
-	case DEV_PM_QOS_MIN_FREQUENCY:
-		ret = blocking_notifier_chain_register(dev->power.qos->min_frequency.notifiers,
-						       notifier);
-		break;
-	case DEV_PM_QOS_MAX_FREQUENCY:
-		ret = blocking_notifier_chain_register(dev->power.qos->max_frequency.notifiers,
-						       notifier);
-		break;
 	default:
 		WARN_ON(1);
 		ret = -EINVAL;
@@ -604,14 +546,6 @@ int dev_pm_qos_remove_notifier(struct de
 		ret = blocking_notifier_chain_unregister(dev->power.qos->resume_latency.notifiers,
 							 notifier);
 		break;
-	case DEV_PM_QOS_MIN_FREQUENCY:
-		ret = blocking_notifier_chain_unregister(dev->power.qos->min_frequency.notifiers,
-							 notifier);
-		break;
-	case DEV_PM_QOS_MAX_FREQUENCY:
-		ret = blocking_notifier_chain_unregister(dev->power.qos->max_frequency.notifiers,
-							 notifier);
-		break;
 	default:
 		WARN_ON(1);
 		ret = -EINVAL;




^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
                   ` (2 preceding siblings ...)
  2019-10-16 10:47 ` [RFT][PATCH 3/3] PM: QoS: Drop frequency QoS types from device PM QoS Rafael J. Wysocki
@ 2019-10-16 14:23 ` Sudeep Holla
  2019-10-17  9:57   ` Viresh Kumar
  2019-10-17 17:14   ` Sudeep Holla
  2019-10-17  9:46 ` Viresh Kumar
  4 siblings, 2 replies; 34+ messages in thread
From: Sudeep Holla @ 2019-10-16 14:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM, Linux ACPI, LKML, Viresh Kumar, Sudeep Holla, Dmitry Osipenko

On Wed, Oct 16, 2019 at 12:37:58PM +0200, Rafael J. Wysocki wrote:
> Hi All,
>
> The motivation for this series is to address the problem discussed here:
>
> https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
>
> and also reported here:
>
> https://lore.kernel.org/linux-pm/20191015155735.GA29105@bogus/
>
> Plus, generally speaking, using the policy CPU as a proxy for the policy
> with respect to PM QoS does not feel particularly straightforward to me
> and adds extra complexity.
>
> Anyway, the first patch adds frequency QoS that is based on "raw" PM QoS (kind
> of in analogy with device PM QoS) and is just about min and max frequency
> requests (no direct relationship to devices).
>
> The second patch switches over cpufreq and its users to the new frequency QoS.
> [The Fixes: tag has been tentatively added to it.]
>
> The third one removes frequency request types from device PM QoS.
>
> Unfortunately, the patches are rather big, but also they are quite
> straightforward.
>
> I didn't have the time to test this series, so giving it a go would be much
> appreciated.

Thanks for the spinning these patches so quickly.

I did give it a spin, but unfortunately it doesn't fix the bug I reported.
So I looked at my bug report in detail and looks like the cpufreq_driver
variable is set to NULL at that point and it fails to dereference it
while trying to execute:
	ret = cpufreq_driver->verify(new_policy);
(Hint verify is at offset 0x1c/28)

So I suspect some race as this platform with bL switcher tries to
unregister and re-register the cpufreq driver during the boot.

I need to spend more time on this as reverting the initial PM QoS patch
to cpufreq.c makes the issue disappear.

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 2/3] cpufreq: Use per-policy frequency QoS
  2019-10-16 10:47 ` [RFT][PATCH 2/3] cpufreq: Use per-policy " Rafael J. Wysocki
@ 2019-10-16 18:01   ` Dmitry Osipenko
  2019-10-17 21:29     ` Dmitry Osipenko
  0 siblings, 1 reply; 34+ messages in thread
From: Dmitry Osipenko @ 2019-10-16 18:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Linux PM, Viresh Kumar; +Cc: Linux ACPI, LKML, Sudeep Holla

16.10.2019 13:47, Rafael J. Wysocki пишет:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Replace the CPU device PM QoS used for the management of min and max
> frequency constraints in cpufreq (and its users) with per-policy
> frequency QoS to avoid problems with cpufreq policies covering
> more then one CPU.
> 
> Namely, a cpufreq driver is registered with the subsys interface
> which calls cpufreq_add_dev() for each CPU, starting from CPU0, so
> currently the PM QoS notifiers are added to the first CPU in the
> policy (i.e. CPU0 in the majority of cases).
> 
> In turn, when the cpufreq driver is unregistered, the subsys interface
> doing that calls cpufreq_remove_dev() for each CPU, starting from CPU0,
> and the PM QoS notifiers are only removed when cpufreq_remove_dev() is
> called for the last CPU in the policy, say CPUx, which as a rule is
> not CPU0 if the policy covers more than one CPU.  Then, the PM QoS
> notifiers cannot be removed, because CPUx does not have them, and
> they are still there in the device PM QoS notifiers list of CPU0,
> which prevents new PM QoS notifiers from being registered for CPU0
> on the next attempt to register the cpufreq driver.
> 
> The same issue occurs when the first CPU in the policy goes offline
> before unregistering the driver.
> 
> After this change it does not matter which CPU is the policy CPU at
> the driver registration time and whether or not it is online all the
> time, because the frequency QoS is per policy and not per CPU.
> 
> Fixes: 18c49926c4bf ("cpufreq: Add QoS requests for userspace constraints")
> Reported-by: Dmitry Osipenko <digetx@gmail.com>
> Reported-by: Sudeep Holla <sudeep.holla@arm.com>
> Diagnosed-by: Viresh Kumar <viresh.kumar@linaro.org> 
> Link: https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> Applies on top of https://patchwork.kernel.org/patch/11191343/
> 
> ---
>  drivers/acpi/processor_driver.c            |    9 +---
>  drivers/acpi/processor_perflib.c           |   18 ++++----
>  drivers/acpi/processor_thermal.c           |   18 ++++----
>  drivers/cpufreq/cpufreq.c                  |   59 ++++++++++++-----------------
>  drivers/cpufreq/intel_pstate.c             |   30 +++++++-------
>  drivers/cpufreq/ppc_cbe_cpufreq_pmi.c      |   15 +++----
>  drivers/macintosh/windfarm_cpufreq_clamp.c |   38 ++++++++++--------
>  drivers/thermal/cpu_cooling.c              |   14 +++---
>  include/acpi/processor.h                   |   20 ++++-----
>  include/linux/cpufreq.h                    |    7 ++-
>  10 files changed, 114 insertions(+), 114 deletions(-)

Thanks, Rafael! The use-after-free bug is fixed for me.

Tested-by: Dmitry Osipenko <digetx@gmail.com>

Viresh, I'm still seeing the warning splat after cpufreq-dt reloading. It looks like there is a
problem with dev_pm_opp_set_supported_hw() which should be re-applied after
dev_pm_opp_of_cpumask_remove_table() in order to avoid that warning, but setting supported hardware
is not a part of the cpufreq-dt driver and thus I think there is a problem here.

[   43.362906] ------------[ cut here ]------------
[   43.363403] WARNING: CPU: 2 PID: 224 at lib/refcount.c:156 dev_pm_opp_of_add_table+0x59/0x128
[   43.364119] refcount_t: increment on 0; use-after-free.
[   43.364562] Modules linked in: cpufreq_dt(+) tegra30_devfreq [last unloaded: cpufreq_dt]
[   43.365268] CPU: 2 PID: 224 Comm: modprobe Tainted: G        W
5.4.0-rc3-next-20191016-00202-gdc740c468ab7 #2651
[   43.366167] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[   43.366747] [<c011116d>] (unwind_backtrace) from [<c010bb05>] (show_stack+0x11/0x14)
[   43.367417] [<c010bb05>] (show_stack) from [<c0d75aad>] (dump_stack+0x89/0x98)
[   43.368046] [<c0d75aad>] (dump_stack) from [<c0127813>] (__warn+0x10f/0x110)
[   43.368650] [<c0127813>] (__warn) from [<c0127b09>] (warn_slowpath_fmt+0x61/0x78)
[   43.369292] [<c0127b09>] (warn_slowpath_fmt) from [<c095b161>] (dev_pm_opp_of_add_table+0x59/0x128)
[   43.370057] [<c095b161>] (dev_pm_opp_of_add_table) from [<c095b261>]
(dev_pm_opp_of_cpumask_add_table+0x31/0x88)
[   43.370946] [<c095b261>] (dev_pm_opp_of_cpumask_add_table) from [<bf80024d>]
(cpufreq_init+0xd9/0x280 [cpufreq_dt])
[   43.371853] [<bf80024d>] (cpufreq_init [cpufreq_dt]) from [<c095ec63>] (cpufreq_online+0x3eb/0x890)
[   43.372638] [<c095ec63>] (cpufreq_online) from [<c095f191>] (cpufreq_add_dev+0x79/0x80)
[   43.373340] [<c095f191>] (cpufreq_add_dev) from [<c07201db>] (subsys_interface_register+0xc3/0x100)
[   43.374113] [<c07201db>] (subsys_interface_register) from [<c095d91b>]
(cpufreq_register_driver+0x13b/0x1f0)
[   43.374960] [<c095d91b>] (cpufreq_register_driver) from [<bf80047d>] (dt_cpufreq_probe+0x89/0xe0
[cpufreq_dt])
[   43.375818] [<bf80047d>] (dt_cpufreq_probe [cpufreq_dt]) from [<c0723df9>]
(platform_drv_probe+0x49/0x88)
[   43.376630] [<c0723df9>] (platform_drv_probe) from [<c0721aa1>] (really_probe+0x109/0x378)
[   43.377330] [<c0721aa1>] (really_probe) from [<c0721e5b>] (driver_probe_device+0x57/0x15c)
[   43.378030] [<c0721e5b>] (driver_probe_device) from [<c072210d>] (device_driver_attach+0x61/0x64)
[   43.378776] [<c072210d>] (device_driver_attach) from [<c0722159>] (__driver_attach+0x49/0xa0)
[   43.379493] [<c0722159>] (__driver_attach) from [<c071fe35>] (bus_for_each_dev+0x69/0x94)
[   43.380185] [<c071fe35>] (bus_for_each_dev) from [<c0720f39>] (bus_add_driver+0x179/0x1e8)
[   43.380883] [<c0720f39>] (bus_add_driver) from [<c0722cbf>] (driver_register+0x8f/0x130)
[   43.381584] [<c0722cbf>] (driver_register) from [<bf80d017>] (dt_cpufreq_platdrv_init+0x17/0x1000
[cpufreq_dt])
[   43.382447] [<bf80d017>] (dt_cpufreq_platdrv_init [cpufreq_dt]) from [<d7fca400>] (0xd7fca400)
[   43.383252] ---[ end trace f68728a0d3053b55 ]---


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
@ 2019-10-17  9:41   ` Viresh Kumar
  2019-10-17 14:16     ` Rafael J. Wysocki
  2019-10-24 19:01   ` Leonard Crestez
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-17  9:41 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM, Linux ACPI, LKML, Sudeep Holla, Dmitry Osipenko

On 16-10-19, 12:41, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Introduce frequency QoS, based on the "raw" low-level PM QoS, to
> represent min and max frequency requests and aggregate constraints.
> 
> The min and max frequency requests are to be represented by
> struct freq_qos_request objects and the aggregate constraints are to
> be represented by struct freq_constraints objects.  The latter are
> expected to be initialized with the help of freq_constraints_init().
> 
> The freq_qos_read_value() helper is defined to retrieve the aggregate
> constraints values from a given struct freq_constraints object and
> there are the freq_qos_add_request(), freq_qos_update_request() and
> freq_qos_remove_request() helpers to manipulate the min and max
> frequency requests.  It is assumed that the the helpers will not
> run concurrently with each other for the same struct freq_qos_request
> object, so if that may be the case, their uses must ensure proper
> synchronization between them (e.g. through locking).
> 
> In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
> are provided to add and remove notifiers that will trigger on aggregate
> constraint changes to and from a given struct freq_constraints object,
> respectively.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  include/linux/pm_qos.h |   44 ++++++++
>  kernel/power/qos.c     |  240 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 284 insertions(+)
> 
> Index: linux-pm/include/linux/pm_qos.h
> ===================================================================
> --- linux-pm.orig/include/linux/pm_qos.h
> +++ linux-pm/include/linux/pm_qos.h
> @@ -267,4 +267,48 @@ static inline s32 dev_pm_qos_raw_resume_
>  }
>  #endif
>  
> +#define FREQ_QOS_MIN_DEFAULT_VALUE	0
> +#define FREQ_QOS_MAX_DEFAULT_VALUE	(-1)
> +
> +enum freq_qos_req_type {
> +	FREQ_QOS_MIN = 1,
> +	FREQ_QOS_MAX,
> +};
> +
> +struct freq_constraints {
> +	struct pm_qos_constraints min_freq;
> +	struct blocking_notifier_head min_freq_notifiers;
> +	struct pm_qos_constraints max_freq;
> +	struct blocking_notifier_head max_freq_notifiers;
> +};
> +
> +struct freq_qos_request {
> +	enum freq_qos_req_type type;
> +	struct plist_node pnode;
> +	struct freq_constraints *qos;
> +};
> +
> +static inline int freq_qos_request_active(struct freq_qos_request *req)
> +{
> +	return !IS_ERR_OR_NULL(req->qos);
> +}
> +
> +void freq_constraints_init(struct freq_constraints *qos);
> +
> +s32 freq_qos_read_value(struct freq_constraints *qos,
> +			enum freq_qos_req_type type);
> +
> +int freq_qos_add_request(struct freq_constraints *qos,
> +			 struct freq_qos_request *req,
> +			 enum freq_qos_req_type type, s32 value);
> +int freq_qos_update_request(struct freq_qos_request *req, s32 new_value);
> +int freq_qos_remove_request(struct freq_qos_request *req);
> +
> +int freq_qos_add_notifier(struct freq_constraints *qos,
> +			  enum freq_qos_req_type type,
> +			  struct notifier_block *notifier);
> +int freq_qos_remove_notifier(struct freq_constraints *qos,
> +			     enum freq_qos_req_type type,
> +			     struct notifier_block *notifier);
> +
>  #endif
> Index: linux-pm/kernel/power/qos.c
> ===================================================================
> --- linux-pm.orig/kernel/power/qos.c
> +++ linux-pm/kernel/power/qos.c
> @@ -650,3 +650,243 @@ static int __init pm_qos_power_init(void
>  }
>  
>  late_initcall(pm_qos_power_init);
> +
> +/* Definitions related to the frequency QoS below. */
> +
> +/**
> + * freq_constraints_init - Initialize frequency QoS constraints.
> + * @qos: Frequency QoS constraints to initialize.
> + */
> +void freq_constraints_init(struct freq_constraints *qos)
> +{
> +	struct pm_qos_constraints *c;
> +
> +	c = &qos->min_freq;
> +	plist_head_init(&c->list);
> +	c->target_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> +	c->default_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> +	c->no_constraint_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> +	c->type = PM_QOS_MAX;

should this be MIN ?

> +	c->notifiers = &qos->min_freq_notifiers;
> +	BLOCKING_INIT_NOTIFIER_HEAD(c->notifiers);
> +
> +	c = &qos->max_freq;
> +	plist_head_init(&c->list);
> +	c->target_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> +	c->default_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> +	c->no_constraint_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> +	c->type = PM_QOS_MIN;

and this MAX ?

> +	c->notifiers = &qos->max_freq_notifiers;
> +	BLOCKING_INIT_NOTIFIER_HEAD(c->notifiers);
> +}
> +
> +/**
> + * freq_qos_read_value - Get frequency QoS constraint for a given list.
> + * @qos: Constraints to evaluate.
> + * @type: QoS request type.
> + */
> +s32 freq_qos_read_value(struct freq_constraints *qos,
> +			enum freq_qos_req_type type)
> +{
> +	s32 ret;
> +
> +	switch (type) {
> +	case FREQ_QOS_MIN:
> +		ret = IS_ERR_OR_NULL(qos) ?
> +			FREQ_QOS_MIN_DEFAULT_VALUE :
> +			pm_qos_read_value(&qos->min_freq);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = IS_ERR_OR_NULL(qos) ?
> +			FREQ_QOS_MAX_DEFAULT_VALUE :
> +			pm_qos_read_value(&qos->max_freq);
> +		break;
> +	default:
> +		WARN_ON(1);
> +		ret = 0;
> +	}
> +
> +	return ret;
> +}
> +
> +/**
> + * freq_qos_apply - Add/modify/remove frequency QoS request.
> + * @req: Constraint request to apply.
> + * @action: Action to perform (add/update/remove).
> + * @value: Value to assign to the QoS request.
> + */
> +static int freq_qos_apply(struct freq_qos_request *req,
> +			  enum pm_qos_req_action action, s32 value)
> +{
> +	int ret;
> +
> +	switch(req->type) {
> +	case FREQ_QOS_MIN:
> +		ret = pm_qos_update_target(&req->qos->min_freq, &req->pnode,
> +					   action, value);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = pm_qos_update_target(&req->qos->max_freq, &req->pnode,
> +					   action, value);
> +		break;
> +	default:
> +		ret = -EINVAL;
> +	}
> +
> +	return ret;
> +}
> +
> +/**
> + * freq_qos_add_request - Insert new frequency QoS request into a given list.
> + * @qos: Constraints to update.
> + * @req: Preallocated request object.
> + * @type: Request type.
> + * @value: Request value.
> + *
> + * Insert a new entry into the @qos list of requests, recompute the effective
> + * QoS constraint value for that list and initialize the @req object.  The
> + * caller needs to save that object for later use in updates and removal.
> + *
> + * Return 1 if the effective constraint value has changed, 0 if the effective
> + * constraint value has not changed, or a negative error code on failures.
> + */
> +int freq_qos_add_request(struct freq_constraints *qos,
> +			 struct freq_qos_request *req,
> +			 enum freq_qos_req_type type, s32 value)
> +{
> +	int ret;
> +
> +	if (IS_ERR_OR_NULL(qos) || !req)
> +		return -EINVAL;
> +
> +	if (WARN(freq_qos_request_active(req),
> +		 "%s() called for active request\n", __func__))
> +		return -EINVAL;
> +
> +	req->qos = qos;
> +	req->type = type;
> +	ret = freq_qos_apply(req, PM_QOS_ADD_REQ, value);
> +	if (ret < 0) {
> +		req->qos = NULL;
> +		req->type = 0;
> +	}
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_add_request);
> +
> +/**
> + * freq_qos_update_request - Modify existing frequency QoS request.
> + * @req: Request to modify.
> + * @new_value: New request value.
> + *
> + * Update an existing frequency QoS request along with the effective constraint
> + * value for the list of requests it belongs to.
> + *
> + * Return 1 if the effective constraint value has changed, 0 if the effective
> + * constraint value has not changed, or a negative error code on failures.
> + */
> +int freq_qos_update_request(struct freq_qos_request *req, s32 new_value)
> +{
> +	if (!req)
> +		return -EINVAL;
> +
> +	if (WARN(!freq_qos_request_active(req),
> +		 "%s() called for unknown object\n", __func__))
> +		return -EINVAL;
> +
> +	if (req->pnode.prio == new_value)
> +		return 0;
> +
> +	return freq_qos_apply(req, PM_QOS_UPDATE_REQ, new_value);
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_update_request);
> +
> +/**
> + * freq_qos_remove_request - Remove frequency QoS request from its list.
> + * @req: Request to remove.
> + *
> + * Remove the given frequency QoS request from the list of constraints it
> + * belongs to and recompute the effective constraint value for that list.
> + *
> + * Return 1 if the effective constraint value has changed, 0 if the effective
> + * constraint value has not changed, or a negative error code on failures.
> + */
> +int freq_qos_remove_request(struct freq_qos_request *req)
> +{
> +	if (!req)
> +		return -EINVAL;
> +
> +	if (WARN(!freq_qos_request_active(req),
> +		 "%s() called for unknown object\n", __func__))
> +		return -EINVAL;
> +
> +	return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_remove_request);
> +
> +/**
> + * freq_qos_add_notifier - Add frequency QoS change notifier.
> + * @qos: List of requests to add the notifier to.
> + * @type: Request type.
> + * @notifier: Notifier block to add.
> + */
> +int freq_qos_add_notifier(struct freq_constraints *qos,
> +			  enum freq_qos_req_type type,
> +			  struct notifier_block *notifier)
> +{
> +	int ret;
> +
> +	if (IS_ERR_OR_NULL(qos) || !notifier)
> +		return -EINVAL;
> +
> +	switch (type) {
> +	case FREQ_QOS_MIN:
> +		ret = blocking_notifier_chain_register(qos->min_freq.notifiers,
> +						       notifier);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = blocking_notifier_chain_register(qos->max_freq.notifiers,
> +						       notifier);
> +		break;
> +	default:
> +		WARN_ON(1);
> +		ret = -EINVAL;
> +	}
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_add_notifier);
> +
> +/**
> + * freq_qos_remove_notifier - Remove frequency QoS change notifier.
> + * @qos: List of requests to remove the notifier from.
> + * @type: Request type.
> + * @notifier: Notifier block to remove.
> + */
> +int freq_qos_remove_notifier(struct freq_constraints *qos,
> +			     enum freq_qos_req_type type,
> +			     struct notifier_block *notifier)
> +{
> +	int ret;
> +
> +	if (IS_ERR_OR_NULL(qos) || !notifier)
> +		return -EINVAL;
> +
> +	switch (type) {
> +	case FREQ_QOS_MIN:
> +		ret = blocking_notifier_chain_unregister(qos->min_freq.notifiers,
> +							 notifier);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = blocking_notifier_chain_unregister(qos->max_freq.notifiers,
> +							 notifier);
> +		break;
> +	default:
> +		WARN_ON(1);
> +		ret = -EINVAL;
> +	}
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_remove_notifier);
> 
> 

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
                   ` (3 preceding siblings ...)
  2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
@ 2019-10-17  9:46 ` Viresh Kumar
  4 siblings, 0 replies; 34+ messages in thread
From: Viresh Kumar @ 2019-10-17  9:46 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM, Linux ACPI, LKML, Sudeep Holla, Dmitry Osipenko

On 16-10-19, 12:37, Rafael J. Wysocki wrote:
> Hi All,
> 
> The motivation for this series is to address the problem discussed here:
> 
> https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
> 
> and also reported here:
> 
> https://lore.kernel.org/linux-pm/20191015155735.GA29105@bogus/
> 
> Plus, generally speaking, using the policy CPU as a proxy for the policy
> with respect to PM QoS does not feel particularly straightforward to me
> and adds extra complexity.
> 
> Anyway, the first patch adds frequency QoS that is based on "raw" PM QoS (kind
> of in analogy with device PM QoS) and is just about min and max frequency
> requests (no direct relationship to devices).
> 
> The second patch switches over cpufreq and its users to the new frequency QoS.
> [The Fixes: tag has been tentatively added to it.]
> 
> The third one removes frequency request types from device PM QoS.
> 
> Unfortunately, the patches are rather big, but also they are quite
> straightforward.
> 
> I didn't have the time to test this series, so giving it a go would be much
> appreciated.

Apart from the minor comment on one of the patches, these look okay to me.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
@ 2019-10-17  9:57   ` Viresh Kumar
  2019-10-17  9:59     ` Sudeep Holla
  2019-10-17 17:14   ` Sudeep Holla
  1 sibling, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-17  9:57 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Dmitry Osipenko

On 16-10-19, 15:23, Sudeep Holla wrote:
> Thanks for the spinning these patches so quickly.
> 
> I did give it a spin, but unfortunately it doesn't fix the bug I reported.
> So I looked at my bug report in detail and looks like the cpufreq_driver
> variable is set to NULL at that point and it fails to dereference it
> while trying to execute:
> 	ret = cpufreq_driver->verify(new_policy);
> (Hint verify is at offset 0x1c/28)
> 
> So I suspect some race as this platform with bL switcher tries to
> unregister and re-register the cpufreq driver during the boot.
> 
> I need to spend more time on this as reverting the initial PM QoS patch
> to cpufreq.c makes the issue disappear.

Is this easily reproducible ? cpufreq_driver == NULL shouldn't be the case, it
get updated only once while registering/unregistering cpufreq drivers. That is
the last thing which can go wrong from my point of view :)

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-17  9:57   ` Viresh Kumar
@ 2019-10-17  9:59     ` Sudeep Holla
  2019-10-17 16:34       ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Sudeep Holla @ 2019-10-17  9:59 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Dmitry Osipenko

On Thu, Oct 17, 2019 at 03:27:25PM +0530, Viresh Kumar wrote:
> On 16-10-19, 15:23, Sudeep Holla wrote:
> > Thanks for the spinning these patches so quickly.
> >
> > I did give it a spin, but unfortunately it doesn't fix the bug I reported.
> > So I looked at my bug report in detail and looks like the cpufreq_driver
> > variable is set to NULL at that point and it fails to dereference it
> > while trying to execute:
> > 	ret = cpufreq_driver->verify(new_policy);
> > (Hint verify is at offset 0x1c/28)
> >
> > So I suspect some race as this platform with bL switcher tries to
> > unregister and re-register the cpufreq driver during the boot.
> >
> > I need to spend more time on this as reverting the initial PM QoS patch
> > to cpufreq.c makes the issue disappear.
>
> Is this easily reproducible ? cpufreq_driver == NULL shouldn't be the case, it
> get updated only once while registering/unregistering cpufreq drivers. That is
> the last thing which can go wrong from my point of view :)
>

Yes, if I boot my TC2 with bL switcher enabled, it always crashes on boot.

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-17  9:41   ` Viresh Kumar
@ 2019-10-17 14:16     ` Rafael J. Wysocki
  2019-10-18  5:41       ` Viresh Kumar
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-17 14:16 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Sudeep Holla,
	Dmitry Osipenko

On Thu, Oct 17, 2019 at 11:41 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 16-10-19, 12:41, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Introduce frequency QoS, based on the "raw" low-level PM QoS, to
> > represent min and max frequency requests and aggregate constraints.
> >
> > The min and max frequency requests are to be represented by
> > struct freq_qos_request objects and the aggregate constraints are to
> > be represented by struct freq_constraints objects.  The latter are
> > expected to be initialized with the help of freq_constraints_init().
> >
> > The freq_qos_read_value() helper is defined to retrieve the aggregate
> > constraints values from a given struct freq_constraints object and
> > there are the freq_qos_add_request(), freq_qos_update_request() and
> > freq_qos_remove_request() helpers to manipulate the min and max
> > frequency requests.  It is assumed that the the helpers will not
> > run concurrently with each other for the same struct freq_qos_request
> > object, so if that may be the case, their uses must ensure proper
> > synchronization between them (e.g. through locking).
> >
> > In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
> > are provided to add and remove notifiers that will trigger on aggregate
> > constraint changes to and from a given struct freq_constraints object,
> > respectively.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >  include/linux/pm_qos.h |   44 ++++++++
> >  kernel/power/qos.c     |  240 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 284 insertions(+)
> >
> > Index: linux-pm/include/linux/pm_qos.h
> > ===================================================================
> > --- linux-pm.orig/include/linux/pm_qos.h
> > +++ linux-pm/include/linux/pm_qos.h
> > @@ -267,4 +267,48 @@ static inline s32 dev_pm_qos_raw_resume_
> >  }
> >  #endif
> >
> > +#define FREQ_QOS_MIN_DEFAULT_VALUE   0
> > +#define FREQ_QOS_MAX_DEFAULT_VALUE   (-1)
> > +
> > +enum freq_qos_req_type {
> > +     FREQ_QOS_MIN = 1,
> > +     FREQ_QOS_MAX,
> > +};
> > +
> > +struct freq_constraints {
> > +     struct pm_qos_constraints min_freq;
> > +     struct blocking_notifier_head min_freq_notifiers;
> > +     struct pm_qos_constraints max_freq;
> > +     struct blocking_notifier_head max_freq_notifiers;
> > +};
> > +
> > +struct freq_qos_request {
> > +     enum freq_qos_req_type type;
> > +     struct plist_node pnode;
> > +     struct freq_constraints *qos;
> > +};
> > +
> > +static inline int freq_qos_request_active(struct freq_qos_request *req)
> > +{
> > +     return !IS_ERR_OR_NULL(req->qos);
> > +}
> > +
> > +void freq_constraints_init(struct freq_constraints *qos);
> > +
> > +s32 freq_qos_read_value(struct freq_constraints *qos,
> > +                     enum freq_qos_req_type type);
> > +
> > +int freq_qos_add_request(struct freq_constraints *qos,
> > +                      struct freq_qos_request *req,
> > +                      enum freq_qos_req_type type, s32 value);
> > +int freq_qos_update_request(struct freq_qos_request *req, s32 new_value);
> > +int freq_qos_remove_request(struct freq_qos_request *req);
> > +
> > +int freq_qos_add_notifier(struct freq_constraints *qos,
> > +                       enum freq_qos_req_type type,
> > +                       struct notifier_block *notifier);
> > +int freq_qos_remove_notifier(struct freq_constraints *qos,
> > +                          enum freq_qos_req_type type,
> > +                          struct notifier_block *notifier);
> > +
> >  #endif
> > Index: linux-pm/kernel/power/qos.c
> > ===================================================================
> > --- linux-pm.orig/kernel/power/qos.c
> > +++ linux-pm/kernel/power/qos.c
> > @@ -650,3 +650,243 @@ static int __init pm_qos_power_init(void
> >  }
> >
> >  late_initcall(pm_qos_power_init);
> > +
> > +/* Definitions related to the frequency QoS below. */
> > +
> > +/**
> > + * freq_constraints_init - Initialize frequency QoS constraints.
> > + * @qos: Frequency QoS constraints to initialize.
> > + */
> > +void freq_constraints_init(struct freq_constraints *qos)
> > +{
> > +     struct pm_qos_constraints *c;
> > +
> > +     c = &qos->min_freq;
> > +     plist_head_init(&c->list);
> > +     c->target_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> > +     c->default_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> > +     c->no_constraint_value = FREQ_QOS_MIN_DEFAULT_VALUE;
> > +     c->type = PM_QOS_MAX;
>
> should this be MIN ?

No, it shouldn't.

For the min frequency, the effective constraint needs to be the
maximum of all requests, because that satisfies all of them (each
request means "the frequency cannot be less than this").

> > +     c->notifiers = &qos->min_freq_notifiers;
> > +     BLOCKING_INIT_NOTIFIER_HEAD(c->notifiers);
> > +
> > +     c = &qos->max_freq;
> > +     plist_head_init(&c->list);
> > +     c->target_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> > +     c->default_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> > +     c->no_constraint_value = FREQ_QOS_MAX_DEFAULT_VALUE;
> > +     c->type = PM_QOS_MIN;
>
> and this MAX ?

Likewise, for the max frequency, the effective constraint needs to be
the minimum of all requests, as each of them means "the frequency
cannot be more than this").

[Also note that the current code in device PM QoS uses MIN and MAX
here in the same way. :-)]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-17  9:59     ` Sudeep Holla
@ 2019-10-17 16:34       ` Rafael J. Wysocki
  2019-10-17 16:42         ` Sudeep Holla
  2019-10-18  5:44         ` Viresh Kumar
  0 siblings, 2 replies; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-17 16:34 UTC (permalink / raw)
  To: Sudeep Holla, Viresh Kumar
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Dmitry Osipenko

On Thu, Oct 17, 2019 at 12:00 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Thu, Oct 17, 2019 at 03:27:25PM +0530, Viresh Kumar wrote:
> > On 16-10-19, 15:23, Sudeep Holla wrote:
> > > Thanks for the spinning these patches so quickly.
> > >
> > > I did give it a spin, but unfortunately it doesn't fix the bug I reported.
> > > So I looked at my bug report in detail and looks like the cpufreq_driver
> > > variable is set to NULL at that point and it fails to dereference it
> > > while trying to execute:
> > >     ret = cpufreq_driver->verify(new_policy);
> > > (Hint verify is at offset 0x1c/28)
> > >
> > > So I suspect some race as this platform with bL switcher tries to
> > > unregister and re-register the cpufreq driver during the boot.
> > >
> > > I need to spend more time on this as reverting the initial PM QoS patch
> > > to cpufreq.c makes the issue disappear.

I guess you mean commit 67d874c3b2c6 ("cpufreq: Register notifiers
with the PM QoS framework")?

That would make sense, because it added the cpufreq_notifier_min() and
cpufreq_notifier_max() that trigger handle_update() via
schedule_work().

[BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
that the new min is less than the new max, because the QoS doesn't do
that.]

> > Is this easily reproducible ? cpufreq_driver == NULL shouldn't be the case, it
> > get updated only once while registering/unregistering cpufreq drivers. That is
> > the last thing which can go wrong from my point of view :)
> >
>
> Yes, if I boot my TC2 with bL switcher enabled, it always crashes on boot.

It does look like handle_update() races with
cpufreq_unregister_driver() and cpufreq_remove_dev (called from there
indirectly) does look racy.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-17 16:34       ` Rafael J. Wysocki
@ 2019-10-17 16:42         ` Sudeep Holla
  2019-10-18  5:44         ` Viresh Kumar
  1 sibling, 0 replies; 34+ messages in thread
From: Sudeep Holla @ 2019-10-17 16:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Viresh Kumar, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Sudeep Holla, Dmitry Osipenko

On Thu, Oct 17, 2019 at 06:34:28PM +0200, Rafael J. Wysocki wrote:
> On Thu, Oct 17, 2019 at 12:00 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Thu, Oct 17, 2019 at 03:27:25PM +0530, Viresh Kumar wrote:
> > > On 16-10-19, 15:23, Sudeep Holla wrote:
> > > > Thanks for the spinning these patches so quickly.
> > > >
> > > > I did give it a spin, but unfortunately it doesn't fix the bug I reported.
> > > > So I looked at my bug report in detail and looks like the cpufreq_driver
> > > > variable is set to NULL at that point and it fails to dereference it
> > > > while trying to execute:
> > > >     ret = cpufreq_driver->verify(new_policy);
> > > > (Hint verify is at offset 0x1c/28)
> > > >
> > > > So I suspect some race as this platform with bL switcher tries to
> > > > unregister and re-register the cpufreq driver during the boot.
> > > >
> > > > I need to spend more time on this as reverting the initial PM QoS patch
> > > > to cpufreq.c makes the issue disappear.
>
> I guess you mean commit 67d874c3b2c6 ("cpufreq: Register notifiers
> with the PM QoS framework")?
>

Correct.

> That would make sense, because it added the cpufreq_notifier_min() and
> cpufreq_notifier_max() that trigger handle_update() via
> schedule_work().
>

Yes, it was not clear as I didn't trace to handle_update earlier. After
looking at depth today afternoon, I arrived at the same conclusion.

> [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> that the new min is less than the new max, because the QoS doesn't do
> that.]
>
> > > Is this easily reproducible ? cpufreq_driver == NULL shouldn't be the case, it
> > > get updated only once while registering/unregistering cpufreq drivers. That is
> > > the last thing which can go wrong from my point of view :)
> > >
> >
> > Yes, if I boot my TC2 with bL switcher enabled, it always crashes on boot.
>
> It does look like handle_update() races with
> cpufreq_unregister_driver() and cpufreq_remove_dev (called from there
> indirectly) does look racy.

Indeed, we just crossed the mails. I just found that and posted a patch.

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
  2019-10-17  9:57   ` Viresh Kumar
@ 2019-10-17 17:14   ` Sudeep Holla
  1 sibling, 0 replies; 34+ messages in thread
From: Sudeep Holla @ 2019-10-17 17:14 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM, Linux ACPI, LKML, Viresh Kumar, Dmitry Osipenko, Sudeep Holla

On Wed, Oct 16, 2019 at 03:23:43PM +0100, Sudeep Holla wrote:
> On Wed, Oct 16, 2019 at 12:37:58PM +0200, Rafael J. Wysocki wrote:
> > Hi All,
> >
> > The motivation for this series is to address the problem discussed here:
> >
> > https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
> >
> > and also reported here:
> >
> > https://lore.kernel.org/linux-pm/20191015155735.GA29105@bogus/
> >
> > Plus, generally speaking, using the policy CPU as a proxy for the policy
> > with respect to PM QoS does not feel particularly straightforward to me
> > and adds extra complexity.
> >
> > Anyway, the first patch adds frequency QoS that is based on "raw" PM QoS (kind
> > of in analogy with device PM QoS) and is just about min and max frequency
> > requests (no direct relationship to devices).
> >
> > The second patch switches over cpufreq and its users to the new frequency QoS.
> > [The Fixes: tag has been tentatively added to it.]
> >
> > The third one removes frequency request types from device PM QoS.
> >
> > Unfortunately, the patches are rather big, but also they are quite
> > straightforward.
> >
> > I didn't have the time to test this series, so giving it a go would be much
> > appreciated.
>
> Thanks for the spinning these patches so quickly.
>
For the record, I thought of providing the crash that this series fixes.
After applying [1] which fixes the boot issue I was seeing on TC2, I started
seeing the below crash, which this series fixes.

FWIW,
Tested-by: Sudeep Holla <sudeep.holla@arm.com>

--

Unable to handle kernel paging request at virtual address 31b2c303
pgd = 772b96e1
[31b2c303] *pgd=a4050003, *pmd=00000000
Internal error: Oops: 206 [#1] SMP THUMB2
Modules linked in:
CPU: 1 PID: 518 Comm: bash Not tainted 5.4.0-rc3-00062-g6e3a7fd7a87e-dirty #123
Hardware name: ARM-Versatile Express
PC is at blocking_notifier_chain_unregister+0x2a/0x78
LR is at blocking_notifier_chain_unregister+0x1b/0x78
Flags: NzCv  IRQs on  FIQs off  Mode SVC_32  ISA Thumb  Segment user
Control: 70c5387d  Table: a57b08c0  DAC: 55555555
Process bash (pid: 518, stack limit = 0x018ebe57)
(blocking_notifier_chain_unregister) from (dev_pm_qos_remove_notifier+0x5d/0xb4)
(dev_pm_qos_remove_notifier) from (cpufreq_policy_free+0x77/0xc8)
(cpufreq_policy_free) from (subsys_interface_unregister+0x4f/0x80)
(subsys_interface_unregister) from (cpufreq_unregister_driver+0x29/0x6c)
(cpufreq_unregister_driver) from (bL_cpufreq_switcher_notifier+0x41/0x4c)
(bL_cpufreq_switcher_notifier) from (notifier_call_chain+0x3d/0x58)
(notifier_call_chain) from (blocking_notifier_call_chain+0x29/0x38)
(blocking_notifier_call_chain) from (bL_activation_notify+0x13/0x40)
(bL_activation_notify) from (bL_switcher_active_store+0x59/0x190)
(bL_switcher_active_store) from (kernfs_fop_write+0x85/0x12c)
(kernfs_fop_write) from (__vfs_write+0x21/0x130)
(__vfs_write) from (vfs_write+0x6b/0xfc)
(vfs_write) from (ksys_write+0x6d/0x90)
(ksys_write) from (ret_fast_syscall+0x1/0x5a)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 2/3] cpufreq: Use per-policy frequency QoS
  2019-10-16 18:01   ` Dmitry Osipenko
@ 2019-10-17 21:29     ` Dmitry Osipenko
  2019-10-18  9:29       ` Viresh Kumar
  0 siblings, 1 reply; 34+ messages in thread
From: Dmitry Osipenko @ 2019-10-17 21:29 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Sudeep Holla

16.10.2019 21:01, Dmitry Osipenko пишет:
> 16.10.2019 13:47, Rafael J. Wysocki пишет:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Replace the CPU device PM QoS used for the management of min and max
>> frequency constraints in cpufreq (and its users) with per-policy
>> frequency QoS to avoid problems with cpufreq policies covering
>> more then one CPU.
>>
>> Namely, a cpufreq driver is registered with the subsys interface
>> which calls cpufreq_add_dev() for each CPU, starting from CPU0, so
>> currently the PM QoS notifiers are added to the first CPU in the
>> policy (i.e. CPU0 in the majority of cases).
>>
>> In turn, when the cpufreq driver is unregistered, the subsys interface
>> doing that calls cpufreq_remove_dev() for each CPU, starting from CPU0,
>> and the PM QoS notifiers are only removed when cpufreq_remove_dev() is
>> called for the last CPU in the policy, say CPUx, which as a rule is
>> not CPU0 if the policy covers more than one CPU.  Then, the PM QoS
>> notifiers cannot be removed, because CPUx does not have them, and
>> they are still there in the device PM QoS notifiers list of CPU0,
>> which prevents new PM QoS notifiers from being registered for CPU0
>> on the next attempt to register the cpufreq driver.
>>
>> The same issue occurs when the first CPU in the policy goes offline
>> before unregistering the driver.
>>
>> After this change it does not matter which CPU is the policy CPU at
>> the driver registration time and whether or not it is online all the
>> time, because the frequency QoS is per policy and not per CPU.
>>
>> Fixes: 18c49926c4bf ("cpufreq: Add QoS requests for userspace constraints")
>> Reported-by: Dmitry Osipenko <digetx@gmail.com>
>> Reported-by: Sudeep Holla <sudeep.holla@arm.com>
>> Diagnosed-by: Viresh Kumar <viresh.kumar@linaro.org> 
>> Link: https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> ---
>>
>> Applies on top of https://patchwork.kernel.org/patch/11191343/
>>
>> ---
>>  drivers/acpi/processor_driver.c            |    9 +---
>>  drivers/acpi/processor_perflib.c           |   18 ++++----
>>  drivers/acpi/processor_thermal.c           |   18 ++++----
>>  drivers/cpufreq/cpufreq.c                  |   59 ++++++++++++-----------------
>>  drivers/cpufreq/intel_pstate.c             |   30 +++++++-------
>>  drivers/cpufreq/ppc_cbe_cpufreq_pmi.c      |   15 +++----
>>  drivers/macintosh/windfarm_cpufreq_clamp.c |   38 ++++++++++--------
>>  drivers/thermal/cpu_cooling.c              |   14 +++---
>>  include/acpi/processor.h                   |   20 ++++-----
>>  include/linux/cpufreq.h                    |    7 ++-
>>  10 files changed, 114 insertions(+), 114 deletions(-)
> 
> Thanks, Rafael! The use-after-free bug is fixed for me.
> 
> Tested-by: Dmitry Osipenko <digetx@gmail.com>
> 
> Viresh, I'm still seeing the warning splat after cpufreq-dt reloading. It looks like there is a
> problem with dev_pm_opp_set_supported_hw() which should be re-applied after
> dev_pm_opp_of_cpumask_remove_table() in order to avoid that warning, but setting supported hardware
> is not a part of the cpufreq-dt driver and thus I think there is a problem here.
> 
> [   43.362906] ------------[ cut here ]------------
> [   43.363403] WARNING: CPU: 2 PID: 224 at lib/refcount.c:156 dev_pm_opp_of_add_table+0x59/0x128
> [   43.364119] refcount_t: increment on 0; use-after-free.
> [   43.364562] Modules linked in: cpufreq_dt(+) tegra30_devfreq [last unloaded: cpufreq_dt]
> [   43.365268] CPU: 2 PID: 224 Comm: modprobe Tainted: G        W
> 5.4.0-rc3-next-20191016-00202-gdc740c468ab7 #2651
> [   43.366167] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
> [   43.366747] [<c011116d>] (unwind_backtrace) from [<c010bb05>] (show_stack+0x11/0x14)
> [   43.367417] [<c010bb05>] (show_stack) from [<c0d75aad>] (dump_stack+0x89/0x98)
> [   43.368046] [<c0d75aad>] (dump_stack) from [<c0127813>] (__warn+0x10f/0x110)
> [   43.368650] [<c0127813>] (__warn) from [<c0127b09>] (warn_slowpath_fmt+0x61/0x78)
> [   43.369292] [<c0127b09>] (warn_slowpath_fmt) from [<c095b161>] (dev_pm_opp_of_add_table+0x59/0x128)
> [   43.370057] [<c095b161>] (dev_pm_opp_of_add_table) from [<c095b261>]
> (dev_pm_opp_of_cpumask_add_table+0x31/0x88)
> [   43.370946] [<c095b261>] (dev_pm_opp_of_cpumask_add_table) from [<bf80024d>]
> (cpufreq_init+0xd9/0x280 [cpufreq_dt])
> [   43.371853] [<bf80024d>] (cpufreq_init [cpufreq_dt]) from [<c095ec63>] (cpufreq_online+0x3eb/0x890)
> [   43.372638] [<c095ec63>] (cpufreq_online) from [<c095f191>] (cpufreq_add_dev+0x79/0x80)
> [   43.373340] [<c095f191>] (cpufreq_add_dev) from [<c07201db>] (subsys_interface_register+0xc3/0x100)
> [   43.374113] [<c07201db>] (subsys_interface_register) from [<c095d91b>]
> (cpufreq_register_driver+0x13b/0x1f0)
> [   43.374960] [<c095d91b>] (cpufreq_register_driver) from [<bf80047d>] (dt_cpufreq_probe+0x89/0xe0
> [cpufreq_dt])
> [   43.375818] [<bf80047d>] (dt_cpufreq_probe [cpufreq_dt]) from [<c0723df9>]
> (platform_drv_probe+0x49/0x88)
> [   43.376630] [<c0723df9>] (platform_drv_probe) from [<c0721aa1>] (really_probe+0x109/0x378)
> [   43.377330] [<c0721aa1>] (really_probe) from [<c0721e5b>] (driver_probe_device+0x57/0x15c)
> [   43.378030] [<c0721e5b>] (driver_probe_device) from [<c072210d>] (device_driver_attach+0x61/0x64)
> [   43.378776] [<c072210d>] (device_driver_attach) from [<c0722159>] (__driver_attach+0x49/0xa0)
> [   43.379493] [<c0722159>] (__driver_attach) from [<c071fe35>] (bus_for_each_dev+0x69/0x94)
> [   43.380185] [<c071fe35>] (bus_for_each_dev) from [<c0720f39>] (bus_add_driver+0x179/0x1e8)
> [   43.380883] [<c0720f39>] (bus_add_driver) from [<c0722cbf>] (driver_register+0x8f/0x130)
> [   43.381584] [<c0722cbf>] (driver_register) from [<bf80d017>] (dt_cpufreq_platdrv_init+0x17/0x1000
> [cpufreq_dt])
> [   43.382447] [<bf80d017>] (dt_cpufreq_platdrv_init [cpufreq_dt]) from [<d7fca400>] (0xd7fca400)
> [   43.383252] ---[ end trace f68728a0d3053b55 ]---
> 

Viresh, the warning is actually triggered by this line:

https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/opp/of.c#L664

So it looks like the cpufreq-dt driver removal drops
opp_table->list_kref more times than it should be. I may try to take a
closer look at it later on, please let me know if you have any suggestions.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-17 14:16     ` Rafael J. Wysocki
@ 2019-10-18  5:41       ` Viresh Kumar
  0 siblings, 0 replies; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  5:41 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Sudeep Holla,
	Dmitry Osipenko

On 17-10-19, 16:16, Rafael J. Wysocki wrote:
> [Also note that the current code in device PM QoS uses MIN and MAX
> here in the same way. :-)]

Stupid me, enough embarrassment for the day :(

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-17 16:34       ` Rafael J. Wysocki
  2019-10-17 16:42         ` Sudeep Holla
@ 2019-10-18  5:44         ` Viresh Kumar
  2019-10-18  8:24           ` Rafael J. Wysocki
  1 sibling, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  5:44 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sudeep Holla, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Dmitry Osipenko

On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> that the new min is less than the new max, because the QoS doesn't do
> that.]

The ->verify() callback does that for us I believe.

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  5:44         ` Viresh Kumar
@ 2019-10-18  8:24           ` Rafael J. Wysocki
  2019-10-18  8:27             ` Viresh Kumar
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-18  8:24 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Sudeep Holla, Rafael J. Wysocki, Linux PM,
	Linux ACPI, LKML, Dmitry Osipenko

On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > that the new min is less than the new max, because the QoS doesn't do
> > that.]
>
> The ->verify() callback does that for us I believe.

It does in practice AFAICS, but in theory it may assume the right
ordering between the min and the max and just test the boundaries, may
it not?

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  8:24           ` Rafael J. Wysocki
@ 2019-10-18  8:27             ` Viresh Kumar
  2019-10-18  8:30               ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  8:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sudeep Holla, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Dmitry Osipenko

On 18-10-19, 10:24, Rafael J. Wysocki wrote:
> On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > > that the new min is less than the new max, because the QoS doesn't do
> > > that.]
> >
> > The ->verify() callback does that for us I believe.
> 
> It does in practice AFAICS, but in theory it may assume the right
> ordering between the min and the max and just test the boundaries, may
> it not?

I think cpufreq_verify_within_limits() gets called for sure from
within ->verify() for all platforms and this explicitly checks

        if (policy->min > policy->max)
                policy->min = policy->max;

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  8:27             ` Viresh Kumar
@ 2019-10-18  8:30               ` Rafael J. Wysocki
  2019-10-18  9:24                 ` Viresh Kumar
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-18  8:30 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Sudeep Holla, Rafael J. Wysocki, Linux PM,
	Linux ACPI, LKML, Dmitry Osipenko

On Fri, Oct 18, 2019 at 10:27 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 18-10-19, 10:24, Rafael J. Wysocki wrote:
> > On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > > > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > > > that the new min is less than the new max, because the QoS doesn't do
> > > > that.]
> > >
> > > The ->verify() callback does that for us I believe.
> >
> > It does in practice AFAICS, but in theory it may assume the right
> > ordering between the min and the max and just test the boundaries, may
> > it not?
>
> I think cpufreq_verify_within_limits() gets called for sure from
> within ->verify() for all platforms

That's why I mean by "in practice". :-)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  8:30               ` Rafael J. Wysocki
@ 2019-10-18  9:24                 ` Viresh Kumar
  2019-10-18  9:26                   ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  9:24 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sudeep Holla, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Dmitry Osipenko

On 18-10-19, 10:30, Rafael J. Wysocki wrote:
> On Fri, Oct 18, 2019 at 10:27 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 18-10-19, 10:24, Rafael J. Wysocki wrote:
> > > On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > >
> > > > On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > > > > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > > > > that the new min is less than the new max, because the QoS doesn't do
> > > > > that.]
> > > >
> > > > The ->verify() callback does that for us I believe.
> > >
> > > It does in practice AFAICS, but in theory it may assume the right
> > > ordering between the min and the max and just test the boundaries, may
> > > it not?
> >
> > I think cpufreq_verify_within_limits() gets called for sure from
> > within ->verify() for all platforms
> 
> That's why I mean by "in practice". :-)

Hmm, I am not sure if we should really add another min <= max check in
cpufreq_set_policy() as in practice it will never hit :)

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  9:24                 ` Viresh Kumar
@ 2019-10-18  9:26                   ` Rafael J. Wysocki
  2019-10-18  9:28                     ` Viresh Kumar
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-10-18  9:26 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Sudeep Holla, Rafael J. Wysocki, Linux PM,
	Linux ACPI, LKML, Dmitry Osipenko

On Fri, Oct 18, 2019 at 11:24 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 18-10-19, 10:30, Rafael J. Wysocki wrote:
> > On Fri, Oct 18, 2019 at 10:27 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 18-10-19, 10:24, Rafael J. Wysocki wrote:
> > > > On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > > >
> > > > > On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > > > > > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > > > > > that the new min is less than the new max, because the QoS doesn't do
> > > > > > that.]
> > > > >
> > > > > The ->verify() callback does that for us I believe.
> > > >
> > > > It does in practice AFAICS, but in theory it may assume the right
> > > > ordering between the min and the max and just test the boundaries, may
> > > > it not?
> > >
> > > I think cpufreq_verify_within_limits() gets called for sure from
> > > within ->verify() for all platforms
> >
> > That's why I mean by "in practice". :-)
>
> Hmm, I am not sure if we should really add another min <= max check in
> cpufreq_set_policy() as in practice it will never hit :)

Fair enough, but adding a comment regarding that in there would be prudent IMO.


>
> --
> viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
  2019-10-18  9:26                   ` Rafael J. Wysocki
@ 2019-10-18  9:28                     ` Viresh Kumar
  0 siblings, 0 replies; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  9:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sudeep Holla, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Dmitry Osipenko

On 18-10-19, 11:26, Rafael J. Wysocki wrote:
> On Fri, Oct 18, 2019 at 11:24 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 18-10-19, 10:30, Rafael J. Wysocki wrote:
> > > On Fri, Oct 18, 2019 at 10:27 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > >
> > > > On 18-10-19, 10:24, Rafael J. Wysocki wrote:
> > > > > On Fri, Oct 18, 2019 at 7:44 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > > > >
> > > > > > On 17-10-19, 18:34, Rafael J. Wysocki wrote:
> > > > > > > [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> > > > > > > that the new min is less than the new max, because the QoS doesn't do
> > > > > > > that.]
> > > > > >
> > > > > > The ->verify() callback does that for us I believe.
> > > > >
> > > > > It does in practice AFAICS, but in theory it may assume the right
> > > > > ordering between the min and the max and just test the boundaries, may
> > > > > it not?
> > > >
> > > > I think cpufreq_verify_within_limits() gets called for sure from
> > > > within ->verify() for all platforms
> > >
> > > That's why I mean by "in practice". :-)
> >
> > Hmm, I am not sure if we should really add another min <= max check in
> > cpufreq_set_policy() as in practice it will never hit :)
> 
> Fair enough, but adding a comment regarding that in there would be prudent IMO.

will do.

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 2/3] cpufreq: Use per-policy frequency QoS
  2019-10-17 21:29     ` Dmitry Osipenko
@ 2019-10-18  9:29       ` Viresh Kumar
  2019-10-18 15:31         ` Dmitry Osipenko
  0 siblings, 1 reply; 34+ messages in thread
From: Viresh Kumar @ 2019-10-18  9:29 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Sudeep Holla

On 18-10-19, 00:29, Dmitry Osipenko wrote:
> Viresh, the warning is actually triggered by this line:
> 
> https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/opp/of.c#L664
> 
> So it looks like the cpufreq-dt driver removal drops
> opp_table->list_kref more times than it should be. I may try to take a
> closer look at it later on, please let me know if you have any suggestions.

I was able to reproduce it and have sent a fix and cc'd you on it.
Please give it a try.

-- 
viresh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 2/3] cpufreq: Use per-policy frequency QoS
  2019-10-18  9:29       ` Viresh Kumar
@ 2019-10-18 15:31         ` Dmitry Osipenko
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Osipenko @ 2019-10-18 15:31 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Sudeep Holla

18.10.2019 12:29, Viresh Kumar пишет:
> On 18-10-19, 00:29, Dmitry Osipenko wrote:
>> Viresh, the warning is actually triggered by this line:
>>
>> https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/opp/of.c#L664
>>
>> So it looks like the cpufreq-dt driver removal drops
>> opp_table->list_kref more times than it should be. I may try to take a
>> closer look at it later on, please let me know if you have any suggestions.
> 
> I was able to reproduce it and have sent a fix and cc'd you on it.
> Please give it a try.

Thanks!

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
  2019-10-17  9:41   ` Viresh Kumar
@ 2019-10-24 19:01   ` Leonard Crestez
  2019-10-24 19:34     ` Leonard Crestez
  2019-11-17  7:34   ` Doug Smythies
  2019-11-17 16:13   ` Doug Smythies
  3 siblings, 1 reply; 34+ messages in thread
From: Leonard Crestez @ 2019-10-24 19:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: Linux PM, Linux ACPI, LKML, Sudeep Holla, Dmitry Osipenko

On 16.10.2019 13:48, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Introduce frequency QoS, based on the "raw" low-level PM QoS, to
> represent min and max frequency requests and aggregate constraints.
> 
> The min and max frequency requests are to be represented by
> struct freq_qos_request objects and the aggregate constraints are to
> be represented by struct freq_constraints objects.  The latter are
> expected to be initialized with the help of freq_constraints_init().
> 
> The freq_qos_read_value() helper is defined to retrieve the aggregate
> constraints values from a given struct freq_constraints object and
> there are the freq_qos_add_request(), freq_qos_update_request() and
> freq_qos_remove_request() helpers to manipulate the min and max
> frequency requests.  It is assumed that the the helpers will not
> run concurrently with each other for the same struct freq_qos_request
> object, so if that may be the case, their uses must ensure proper
> synchronization between them (e.g. through locking).
> 
> In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
> are provided to add and remove notifiers that will trigger on aggregate
> constraint changes to and from a given struct freq_constraints object,
> respectively.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>   include/linux/pm_qos.h |   44 ++++++++
>   kernel/power/qos.c     |  240 +++++++++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 284 insertions(+)
> 
> Index: linux-pm/include/linux/pm_qos.h
> ===================================================================
> --- linux-pm.orig/include/linux/pm_qos.h
> +++ linux-pm/include/linux/pm_qos.h
> @@ -267,4 +267,48 @@ static inline s32 dev_pm_qos_raw_resume_
>   }
>   #endif
>   
> +#define FREQ_QOS_MIN_DEFAULT_VALUE	0
> +#define FREQ_QOS_MAX_DEFAULT_VALUE	(-1)
> +
> +enum freq_qos_req_type {
> +	FREQ_QOS_MIN = 1,
> +	FREQ_QOS_MAX,
> +};
> +
> +struct freq_constraints {
> +	struct pm_qos_constraints min_freq;
> +	struct blocking_notifier_head min_freq_notifiers;
> +	struct pm_qos_constraints max_freq;
> +	struct blocking_notifier_head max_freq_notifiers;

These min/max_freq_notifiers fields seem unused? They're initialized but 
the freq_qos_add/remove_notifier calls use min/max_freq.notifiers directly.

Should probably just be dropped.

> +/**
> + * freq_qos_add_notifier - Add frequency QoS change notifier.
> + * @qos: List of requests to add the notifier to.
> + * @type: Request type.
> + * @notifier: Notifier block to add.
> + */
> +int freq_qos_add_notifier(struct freq_constraints *qos,
> +			  enum freq_qos_req_type type,
> +			  struct notifier_block *notifier)
> +{
> +	int ret;
> +
> +	if (IS_ERR_OR_NULL(qos) || !notifier)
> +		return -EINVAL;
> +
> +	switch (type) {
> +	case FREQ_QOS_MIN:
> +		ret = blocking_notifier_chain_register(qos->min_freq.notifiers,
> +						       notifier);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = blocking_notifier_chain_register(qos->max_freq.notifiers,
> +						       notifier);
> +		break;
> +	default:
> +		WARN_ON(1);
> +		ret = -EINVAL;
> +	}
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_add_notifier);
> +
> +/**
> + * freq_qos_remove_notifier - Remove frequency QoS change notifier.
> + * @qos: List of requests to remove the notifier from.
> + * @type: Request type.
> + * @notifier: Notifier block to remove.
> + */
> +int freq_qos_remove_notifier(struct freq_constraints *qos,
> +			     enum freq_qos_req_type type,
> +			     struct notifier_block *notifier)
> +{
> +	int ret;
> +
> +	if (IS_ERR_OR_NULL(qos) || !notifier)
> +		return -EINVAL;
> +
> +	switch (type) {
> +	case FREQ_QOS_MIN:
> +		ret = blocking_notifier_chain_unregister(qos->min_freq.notifiers,
> +							 notifier);
> +		break;
> +	case FREQ_QOS_MAX:
> +		ret = blocking_notifier_chain_unregister(qos->max_freq.notifiers,
> +							 notifier);
> +		break;
> +	default:
> +		WARN_ON(1);
> +		ret = -EINVAL;
> +	}
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(freq_qos_remove_notifier);

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-24 19:01   ` Leonard Crestez
@ 2019-10-24 19:34     ` Leonard Crestez
  0 siblings, 0 replies; 34+ messages in thread
From: Leonard Crestez @ 2019-10-24 19:34 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: Linux PM, Linux ACPI, LKML, Sudeep Holla, Dmitry Osipenko

On 24.10.2019 22:01, Leonard Crestez wrote:
> On 16.10.2019 13:48, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Introduce frequency QoS, based on the "raw" low-level PM QoS, to
>> represent min and max frequency requests and aggregate constraints.
>>
>> The min and max frequency requests are to be represented by
>> struct freq_qos_request objects and the aggregate constraints are to
>> be represented by struct freq_constraints objects.  The latter are
>> expected to be initialized with the help of freq_constraints_init().
>>
>> The freq_qos_read_value() helper is defined to retrieve the aggregate
>> constraints values from a given struct freq_constraints object and
>> there are the freq_qos_add_request(), freq_qos_update_request() and
>> freq_qos_remove_request() helpers to manipulate the min and max
>> frequency requests.  It is assumed that the the helpers will not
>> run concurrently with each other for the same struct freq_qos_request
>> object, so if that may be the case, their uses must ensure proper
>> synchronization between them (e.g. through locking).
>>
>> In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
>> are provided to add and remove notifiers that will trigger on aggregate
>> constraint changes to and from a given struct freq_constraints object,
>> respectively.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> ---
>>    include/linux/pm_qos.h |   44 ++++++++
>>    kernel/power/qos.c     |  240 +++++++++++++++++++++++++++++++++++++++++++++++++
>>    2 files changed, 284 insertions(+)
>>
>> Index: linux-pm/include/linux/pm_qos.h
>> ===================================================================
>> --- linux-pm.orig/include/linux/pm_qos.h
>> +++ linux-pm/include/linux/pm_qos.h
>> @@ -267,4 +267,48 @@ static inline s32 dev_pm_qos_raw_resume_
>>    }
>>    #endif
>>    
>> +#define FREQ_QOS_MIN_DEFAULT_VALUE	0
>> +#define FREQ_QOS_MAX_DEFAULT_VALUE	(-1)
>> +
>> +enum freq_qos_req_type {
>> +	FREQ_QOS_MIN = 1,
>> +	FREQ_QOS_MAX,
>> +};
>> +
>> +struct freq_constraints {
>> +	struct pm_qos_constraints min_freq;
>> +	struct blocking_notifier_head min_freq_notifiers;
>> +	struct pm_qos_constraints max_freq;
>> +	struct blocking_notifier_head max_freq_notifiers;
> 
> These min/max_freq_notifiers fields seem unused? They're initialized but
> the freq_qos_add/remove_notifier calls use min/max_freq.notifiers directly.
> 
> Should probably just be dropped.

Never mind, I see now that pm_qos_constraints.notifiers is actually a 
pointer to notifier block provided by somebody else.

--
Regards,
Leonard

^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
  2019-10-17  9:41   ` Viresh Kumar
  2019-10-24 19:01   ` Leonard Crestez
@ 2019-11-17  7:34   ` Doug Smythies
  2019-11-17 16:13   ` Doug Smythies
  3 siblings, 0 replies; 34+ messages in thread
From: Doug Smythies @ 2019-11-17  7:34 UTC (permalink / raw)
  To: 'Rafael J. Wysocki', 'Linux PM'
  Cc: 'Linux ACPI', 'LKML', 'Viresh Kumar',
	'Sudeep Holla', 'Dmitry Osipenko'

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

On 2019.10.16 03:41 Rafael J. Wysocki wrote:

... deleted ...

Hi Rafael,

Not sure, but I think it is this one that
causes complaining when I try to set the
intel_pstate driver to passive mode.
I started from active mode, powersave governor,
no HWP.

Kernel: 5.4-rc7

I did not go back and try previous 5.4 RCs.
I did try kernel 5.3-rc8, because I already had
it installed, and it worked fine.

I use a script (for years), run as sudo:

doug@s15:~/temp$ cat set_cpu_passive
#! /bin/bash
cat /sys/devices/system/cpu/intel_pstate/status
echo passive > /sys/devices/system/cpu/intel_pstate/status
cat /sys/devices/system/cpu/intel_pstate/status

And I get this (very small excerpt):

freq_qos_add_request() called for active request
WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
Failed to add freq constraint for CPU0 (-22)

freq_qos_add_request() called for active request
WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Failed to add freq constraint for CPU1 (-22)

...

I'll attach the whole thing, but it will likely get removed
from the general list e-mails.

... Doug


[-- Attachment #2: rjw.txt --]
[-- Type: text/plain, Size: 94640 bytes --]

Nov 16 22:54:33 s15 kernel: [  116.132508] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.132510] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.132521] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.132522] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.132564]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.132577] CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.132578] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.132581] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.132583] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.132585] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.132587] RAX: 0000000000000000 RBX: ffff96034ccc33a8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.132588] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.132589] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000003c1
Nov 16 22:54:33 s15 kernel: [  116.132591] R10: ffff960344aed6d8 R11: 00000000000003c1 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.132592] R13: 00000000000285f8 R14: ffff96034d0adc90 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132594] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132596] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.132597] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.132598] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.132605]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.132608]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.132612]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.132615]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.132618]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.132622]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.132626]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.132631]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.132635]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.132638]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.132641]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.132644]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.132647]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.132650]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.132653]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.132656]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.132658]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.132661]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.132663]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.132667]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.132671]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.132673] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.132676] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.132677] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.132679] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.132680] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.132681] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.132683] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.132684] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132687] ---[ end trace a1f26554c8afbfac ]---
Nov 16 22:54:33 s15 kernel: [  116.132689] Failed to add freq constraint for CPU0 (-22)
Nov 16 22:54:33 s15 kernel: [  116.132728] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.132729] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.132734] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.132735] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.132766]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.132775] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.132776] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.132778] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.132780] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.132782] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.132783] RAX: 0000000000000000 RBX: ffff96034ccc3370 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.132784] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.132786] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000003f3
Nov 16 22:54:33 s15 kernel: [  116.132787] R10: ffff960344aed6d8 R11: 00000000000003f3 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.132788] R13: 00000000000285f8 R14: ffff96034d0adc90 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132790] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132791] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.132792] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.132793] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.132796]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.132798]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.132801]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.132804]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.132806]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.132810]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.132813]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.132816]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.132820]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.132823]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.132826]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.132828]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.132830]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.132832]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.132835]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.132837]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.132839]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.132842]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.132844]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.132847]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.132850]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.132851] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.132853] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.132854] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.132856] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.132857] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.132859] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.132860] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.132861] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.132864] ---[ end trace a1f26554c8afbfad ]---
Nov 16 22:54:33 s15 kernel: [  116.132865] Failed to add freq constraint for CPU0 (-22)
Nov 16 22:54:33 s15 kernel: [  116.132953] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.132954] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.132959] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.132959] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.132990]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133000] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133001] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133003] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133004] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133005] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133007] RAX: 0000000000000000 RBX: ffff96034ccc63a8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133008] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133009] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 0000000000000425
Nov 16 22:54:33 s15 kernel: [  116.133010] R10: ffff960344aed0d8 R11: 0000000000000425 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133012] R13: 00000000000285f8 R14: ffff96034d0acc90 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133013] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133014] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133016] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133017] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133020]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133022]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.133025]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133027]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133030]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133033]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133037]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133040]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133043]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133046]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133049]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133052]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133054]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133056]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133058]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133060]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133062]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133065]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133068]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133070]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133073]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133075] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133076] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133077] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133079] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133080] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133081] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133083] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133084] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133087] ---[ end trace a1f26554c8afbfae ]---
Nov 16 22:54:33 s15 kernel: [  116.133088] Failed to add freq constraint for CPU1 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133121] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133121] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133126] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133127] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133158]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133167] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133168] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133170] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133171] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133172] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133174] RAX: 0000000000000000 RBX: ffff96034ccc6370 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133175] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133176] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 0000000000000457
Nov 16 22:54:33 s15 kernel: [  116.133177] R10: ffff960344aed0d8 R11: 0000000000000457 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133179] R13: 00000000000285f8 R14: ffff96034d0acc90 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133180] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133181] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133183] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133183] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133186]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133188]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.133191]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133194]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133196]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133199]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133203]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133206]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133210]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133212]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133215]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133218]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133220]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133222]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133224]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133226]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133228]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133231]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133233]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133236]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133239]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133240] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133242] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133243] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133245] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133246] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133247] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133248] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133249] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133252] ---[ end trace a1f26554c8afbfaf ]---
Nov 16 22:54:33 s15 kernel: [  116.133254] Failed to add freq constraint for CPU1 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133422] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133423] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133426] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133427] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133485]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133489] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133490] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133491] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133492] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133493] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133493] RAX: 0000000000000000 RBX: ffff96034ccc27a8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133494] RDX: 0000000000000007 RSI: 0000000000000000 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133494] RBP: ffffba3f80527c30 R08: 0000000000000000 R09: 0000000000000489
Nov 16 22:54:33 s15 kernel: [  116.133495] R10: ffff960344aed2d8 R11: 0000000000000489 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133495] R13: 00000000000285f8 R14: ffff96034d0af090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133496] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133497] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133497] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133498] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133499]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133500]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.133503]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133504]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133505]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133507]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133508]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133510]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133511]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133512]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133514]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133515]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133516]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133517]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133518]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133519]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133520]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133521]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133522]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133523]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133524]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133525] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133526] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133526] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133527] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133528] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133528] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133529] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133529] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133530] ---[ end trace a1f26554c8afbfb0 ]---
Nov 16 22:54:33 s15 kernel: [  116.133531] Failed to add freq constraint for CPU2 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133546] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133547] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133549] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133549] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133570]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133586] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133588] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133591] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133593] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133594] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133596] RAX: 0000000000000000 RBX: ffff96034ccc2770 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133599] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133601] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000004bb
Nov 16 22:54:33 s15 kernel: [  116.133603] R10: ffff960344aed2d8 R11: 00000000000004bb R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133605] R13: 00000000000285f8 R14: ffff96034d0af090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133607] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133609] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133611] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133611] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133613]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133614]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.133615]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133616]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133617]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133619]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133620]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133622]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133623]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133624]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133626]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133627]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133628]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133629]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133630]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133631]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133631]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133633]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133634]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133635]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133636]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133637] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133638] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133638] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133639] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133639] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133640] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133641] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133641] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133642] ---[ end trace a1f26554c8afbfb1 ]---
Nov 16 22:54:33 s15 kernel: [  116.133643] Failed to add freq constraint for CPU2 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133706] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133707] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133709] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133709] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133728]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133735] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133735] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133738] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133739] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133739] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133740] RAX: 0000000000000000 RBX: ffff96034ccc2ba8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133740] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133741] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000004ed
Nov 16 22:54:33 s15 kernel: [  116.133741] R10: ffff960344aed558 R11: 00000000000004ed R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133742] R13: 00000000000285f8 R14: ffff960341845090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133743] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133743] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133744] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133744] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133745]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133747]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.133748]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133749]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133750]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133752]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133753]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133754]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133764]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133765]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133766]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133775]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133775]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133776]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133777]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133778]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133779]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133780]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133782]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133783]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133784]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133785] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133786] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133786] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133787] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133787] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133788] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133788] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133789] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133790] ---[ end trace a1f26554c8afbfb2 ]---
Nov 16 22:54:33 s15 kernel: [  116.133791] Failed to add freq constraint for CPU3 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133806] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133806] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133808] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133809] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133847]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133861] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133862] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133863] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133864] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133864] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133865] RAX: 0000000000000000 RBX: ffff96034ccc2b70 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133865] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133866] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 000000000000051f
Nov 16 22:54:33 s15 kernel: [  116.133866] R10: ffff960344aed558 R11: 000000000000051f R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133867] R13: 00000000000285f8 R14: ffff960341845090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133868] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133868] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133869] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133869] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133870]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133871]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.133872]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133874]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133875]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133876]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133878]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133879]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133881]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133882]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133883]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133884]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133885]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.133886]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.133887]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.133888]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.133889]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.133890]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.133891]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.133892]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.133894]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.133894] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133895] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.133895] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133896] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.133897] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.133897] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.133898] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.133898] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133900] ---[ end trace a1f26554c8afbfb3 ]---
Nov 16 22:54:33 s15 kernel: [  116.133900] Failed to add freq constraint for CPU3 (-22)
Nov 16 22:54:33 s15 kernel: [  116.133927] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.133928] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.133932] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133934] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.133970]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.133975] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.133975] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.133976] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.133977] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.133977] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.133978] RAX: 0000000000000000 RBX: ffff96034ccc7fa8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.133979] RDX: 0000000000000007 RSI: 0000000000000001 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.133979] RBP: ffffba3f80527c30 R08: 0000000000000000 R09: 0000000000000551
Nov 16 22:54:33 s15 kernel: [  116.133980] R10: ffff960344aedad8 R11: 0000000000000551 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.133980] R13: 00000000000285f8 R14: ffff96034d24e090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133981] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.133982] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.133982] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.133982] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.133984]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.133985]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.133986]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.133987]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.133988]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.133990]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.133991]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.133993]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.133994]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133996]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.133997]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.133998]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.133999]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134000]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134001]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134002]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134003]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134004]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134005]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134006]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134008]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134008] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134016] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134017] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134018] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134018] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134019] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134019] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134020] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134021] ---[ end trace a1f26554c8afbfb4 ]---
Nov 16 22:54:33 s15 kernel: [  116.134021] Failed to add freq constraint for CPU4 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134044] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134045] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134047] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134047] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134061]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134065] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134065] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134066] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134067] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134067] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134068] RAX: 0000000000000000 RBX: ffff96034ccc7f70 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134069] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134069] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 0000000000000583
Nov 16 22:54:33 s15 kernel: [  116.134072] R10: ffff960344aedad8 R11: 0000000000000583 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134073] R13: 00000000000285f8 R14: ffff96034d24e090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134075] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134077] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134078] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134080] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134082]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134084]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.134086]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134088]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134090]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134093]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134095]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134098]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134100]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134103]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134105]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134108]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134110]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134112]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134114]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134116]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134118]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134120]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134122]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134124]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134126]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134128] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134130] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134131] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134132] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134132] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134133] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134133] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134134] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134135] ---[ end trace a1f26554c8afbfb5 ]---
Nov 16 22:54:33 s15 kernel: [  116.134136] Failed to add freq constraint for CPU4 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134164] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134166] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134168] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134168] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134188]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134193] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134195] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134196] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134197] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134198] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134199] RAX: 0000000000000000 RBX: ffff96034ccc67a8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134200] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134200] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000005b5
Nov 16 22:54:33 s15 kernel: [  116.134201] R10: ffff960344aed658 R11: 00000000000005b5 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134202] R13: 00000000000285f8 R14: ffff96034cc2e090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134204] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134205] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134206] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134206] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134208]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134209]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.134210]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134212]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134214]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134216]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134218]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134219]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134221]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134222]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134223]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134224]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134227]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134229]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134232]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134234]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134235]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134236]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134237]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134238]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134241]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134242] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134244] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134244] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134245] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134245] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134246] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134246] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134247] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134248] ---[ end trace a1f26554c8afbfb6 ]---
Nov 16 22:54:33 s15 kernel: [  116.134249] Failed to add freq constraint for CPU5 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134266] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134266] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134269] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134269] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134291]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134295] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134295] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134296] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134297] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134297] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134298] RAX: 0000000000000000 RBX: ffff96034ccc6770 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134298] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134299] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000005e7
Nov 16 22:54:33 s15 kernel: [  116.134299] R10: ffff960344aed658 R11: 00000000000005e7 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134300] R13: 00000000000285f8 R14: ffff96034cc2e090 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134301] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134301] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134302] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134302] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134303]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134304]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.134305]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134306]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134308]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134309]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134311]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134312]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134313]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134315]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134316]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134317]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134318]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134319]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134320]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134321]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134322]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134323]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134324]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134325]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134326]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134327] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134328] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134328] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134329] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134329] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134330] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134330] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134331] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134332] ---[ end trace a1f26554c8afbfb7 ]---
Nov 16 22:54:33 s15 kernel: [  116.134332] Failed to add freq constraint for CPU5 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134401] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134403] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134406] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134407] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134435]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134439] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134440] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134441] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134441] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134442] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134442] RAX: 0000000000000000 RBX: ffff96034ccc4ba8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134443] RDX: 0000000000000007 RSI: 0000000000000001 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134443] RBP: ffffba3f80527c30 R08: 0000000000000000 R09: 0000000000000619
Nov 16 22:54:33 s15 kernel: [  116.134444] R10: ffff960344aedfd8 R11: 0000000000000619 R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134444] R13: 00000000000285f8 R14: ffff96034cd33490 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134445] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134446] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134446] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134447] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134448]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134449]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.134450]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134452]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134453]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134454]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134456]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134457]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134459]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134461]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134464]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134466]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134468]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134470]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134472]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134474]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134476]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134478]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134480]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134482]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134484]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134486] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134487] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134487] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134488] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134488] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134489] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134489] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134490] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134491] ---[ end trace a1f26554c8afbfb8 ]---
Nov 16 22:54:33 s15 kernel: [  116.134492] Failed to add freq constraint for CPU6 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134508] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134509] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134512] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134512] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134527]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134531] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134531] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134532] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134533] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134533] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134534] RAX: 0000000000000000 RBX: ffff96034ccc4b70 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134534] RDX: 0000000000000007 RSI: 0000000000000001 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134535] RBP: ffffba3f80527c30 R08: 0000000000000000 R09: 000000000000064b
Nov 16 22:54:33 s15 kernel: [  116.134535] R10: ffff960344aedfd8 R11: 000000000000064b R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134536] R13: 00000000000285f8 R14: ffff96034cd33490 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134537] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134537] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134538] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134538] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134539]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134540]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.134541]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134543]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134544]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134545]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134548]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134550]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134552]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134553]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134554]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134555]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134556]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134557]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134558]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134559]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134560]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134561]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134562]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134563]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134564]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134565] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134566] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134566] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134567] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134568] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134568] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134569] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134569] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134570] ---[ end trace a1f26554c8afbfb9 ]---
Nov 16 22:54:33 s15 kernel: [  116.134571] Failed to add freq constraint for CPU6 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134651] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134652] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134654] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134654] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134668]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134672] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134673] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134673] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134674] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134675] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134675] RAX: 0000000000000000 RBX: ffff96034ccc17a8 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134676] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134676] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 000000000000067d
Nov 16 22:54:33 s15 kernel: [  116.134677] R10: ffff960344aed5d8 R11: 000000000000067d R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134677] R13: 00000000000285f8 R14: ffff960340627490 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134678] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134679] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134679] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134680] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134681]  acpi_thermal_cpufreq_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134682]  acpi_processor_notifier+0x28/0x60
Nov 16 22:54:33 s15 kernel: [  116.134683]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134684]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134686]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134687]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134688]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134690]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134691]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134693]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134694]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134695]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134696]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134697]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134698]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134699]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134700]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134701]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134702]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134703]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134705]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134705] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134706] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134706] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134707] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134708] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134708] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134709] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134709] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134710] ---[ end trace a1f26554c8afbfba ]---
Nov 16 22:54:33 s15 kernel: [  116.134711] Failed to add freq constraint for CPU7 (-22)
Nov 16 22:54:33 s15 kernel: [  116.134726] ------------[ cut here ]------------
Nov 16 22:54:33 s15 kernel: [  116.134726] freq_qos_add_request() called for active request
Nov 16 22:54:33 s15 kernel: [  116.134728] WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134729] Modules linked in: xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6_tables xt_CHECKSUM iptable_mangle xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter ip_tables x_tables bpfilter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bridge snd_hda_intel intel_rapl_msr snd_intel_nhlt intel_rapl_common snd_hda_codec stp snd_hda_core ppdev x86_pkg_temp_thermal snd_hwdep llc intel_powerclamp snd_pcm mei_hdcp snd_timer snd coretemp soundcore intel_cstate intel_rapl_perf input_leds serio_raw mei_me eeepc_wmi mei asus_wmi wmi_bmof sparse_keymap kvm_intel i2c_i801 lpc_ich kvm irqbypass parport_pc mac_hid parport ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 crct10dif_pclmul crc32_pclmul
Nov 16 22:54:33 s15 kernel: [  116.134742]  ghash_clmulni_intel i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops crypto_simd cryptd glue_helper e1000e drm ahci pata_acpi r8169 libahci realtek wmi video
Nov 16 22:54:33 s15 kernel: [  116.134746] CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
Nov 16 22:54:33 s15 kernel: [  116.134747] Hardware name: System manufacturer System Product Name/P8Z68-M PRO, BIOS 4003 05/09/2013
Nov 16 22:54:33 s15 kernel: [  116.134748] RIP: 0010:freq_qos_add_request+0x4c/0xa0
Nov 16 22:54:33 s15 kernel: [  116.134748] Code: f6 74 6b 48 8b 46 30 48 89 f3 48 85 c0 74 25 48 3d 00 f0 ff ff 77 1d 48 c7 c6 20 54 a2 8f 48 c7 c7 88 e7 d0 8f e8 24 d7 f9 ff <0f> 0b 44 89 e0 5b 41 5c 5d c3 48 89 7b 30 89 13 31 f6 89 ca 48 89
Nov 16 22:54:33 s15 kernel: [  116.134749] RSP: 0018:ffffba3f80527c20 EFLAGS: 00010282
Nov 16 22:54:33 s15 kernel: [  116.134750] RAX: 0000000000000000 RBX: ffff96034ccc1770 RCX: 0000000000000006
Nov 16 22:54:33 s15 kernel: [  116.134750] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff96034f457440
Nov 16 22:54:33 s15 kernel: [  116.134751] RBP: ffffba3f80527c30 R08: 0000000000000001 R09: 00000000000006af
Nov 16 22:54:33 s15 kernel: [  116.134751] R10: ffff960344aed5d8 R11: 00000000000006af R12: 00000000ffffffea
Nov 16 22:54:33 s15 kernel: [  116.134752] R13: 00000000000285f8 R14: ffff960340627490 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134752] FS:  00007fcfa6483700(0000) GS:ffff96034f440000(0000) knlGS:0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134753] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 22:54:33 s15 kernel: [  116.134753] CR2: 0000560c3e55ba00 CR3: 0000000402e2c004 CR4: 00000000000606e0
Nov 16 22:54:33 s15 kernel: [  116.134754] Call Trace:
Nov 16 22:54:33 s15 kernel: [  116.134755]  acpi_processor_ppc_init+0x68/0x90
Nov 16 22:54:33 s15 kernel: [  116.134756]  acpi_processor_notifier+0x34/0x60
Nov 16 22:54:33 s15 kernel: [  116.134757]  notifier_call_chain+0x4c/0x70
Nov 16 22:54:33 s15 kernel: [  116.134758]  __blocking_notifier_call_chain+0x47/0x60
Nov 16 22:54:33 s15 kernel: [  116.134760]  blocking_notifier_call_chain+0x16/0x20
Nov 16 22:54:33 s15 kernel: [  116.134762]  cpufreq_online+0x399/0x960
Nov 16 22:54:33 s15 kernel: [  116.134764]  cpufreq_add_dev+0x78/0x90
Nov 16 22:54:33 s15 kernel: [  116.134766]  subsys_interface_register+0xcb/0x120
Nov 16 22:54:33 s15 kernel: [  116.134767]  cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134769]  ? cpufreq_register_driver+0x15e/0x250
Nov 16 22:54:33 s15 kernel: [  116.134770]  intel_pstate_register_driver+0x38/0x70
Nov 16 22:54:33 s15 kernel: [  116.134771]  store_status+0xa5/0x170
Nov 16 22:54:33 s15 kernel: [  116.134772]  kobj_attr_store+0x12/0x20
Nov 16 22:54:33 s15 kernel: [  116.134773]  sysfs_kf_write+0x3c/0x50
Nov 16 22:54:33 s15 kernel: [  116.134774]  kernfs_fop_write+0x125/0x1a0
Nov 16 22:54:33 s15 kernel: [  116.134775]  __vfs_write+0x1b/0x40
Nov 16 22:54:33 s15 kernel: [  116.134776]  vfs_write+0xb8/0x1b0
Nov 16 22:54:33 s15 kernel: [  116.134777]  ksys_write+0x5e/0xe0
Nov 16 22:54:33 s15 kernel: [  116.134778]  __x64_sys_write+0x1a/0x20
Nov 16 22:54:33 s15 kernel: [  116.134779]  do_syscall_64+0x57/0x190
Nov 16 22:54:33 s15 kernel: [  116.134780]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 22:54:33 s15 kernel: [  116.134781] RIP: 0033:0x7fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134782] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
Nov 16 22:54:33 s15 kernel: [  116.134782] RSP: 002b:00007ffd4b8bfec8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134783] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fcfa5b712c0
Nov 16 22:54:33 s15 kernel: [  116.134783] RDX: 0000000000000008 RSI: 00000000021dd408 RDI: 0000000000000001
Nov 16 22:54:33 s15 kernel: [  116.134784] RBP: 00000000021dd408 R08: 00007fcfa5e40780 R09: 00007fcfa6483700
Nov 16 22:54:33 s15 kernel: [  116.134784] R10: 0000000000000099 R11: 0000000000000246 R12: 0000000000000008
Nov 16 22:54:33 s15 kernel: [  116.134785] R13: 0000000000000001 R14: 00007fcfa5e3f620 R15: 0000000000000000
Nov 16 22:54:33 s15 kernel: [  116.134787] ---[ end trace a1f26554c8afbfbb ]---
Nov 16 22:54:33 s15 kernel: [  116.134787] Failed to add freq constraint for CPU7 (-22)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
                     ` (2 preceding siblings ...)
  2019-11-17  7:34   ` Doug Smythies
@ 2019-11-17 16:13   ` Doug Smythies
  2019-11-19 14:35     ` Doug Smythies
  3 siblings, 1 reply; 34+ messages in thread
From: Doug Smythies @ 2019-11-17 16:13 UTC (permalink / raw)
  To: 'Rafael J. Wysocki', 'Linux PM'
  Cc: 'Linux ACPI', 'LKML', 'Viresh Kumar',
	'Sudeep Holla', 'Dmitry Osipenko'

Apologies if people are getting this e-mail twice.
Because it had an attachment, I think it got deleted
from list distribution.

On 2019.11.16 23:35 Doug Smythies wrote:
> On 2019.10.16 03:41 Rafael J. Wysocki wrote:
>
> ... deleted ...
>
> Hi Rafael,
>
> Not sure, but I think it is this one that
> causes complaining when I try to set the
> intel_pstate driver to passive mode.
> I started from active mode, powersave governor,
> no HWP.
>
> Kernel: 5.4-rc7
>
> I did not go back and try previous 5.4 RCs.
> I did try kernel 5.3-rc8, because I already had
> it installed, and it worked fine.
>
> I use a script (for years), run as sudo:
>
> doug@s15:~/temp$ cat set_cpu_passive
> #! /bin/bash
> cat /sys/devices/system/cpu/intel_pstate/status
> echo passive > /sys/devices/system/cpu/intel_pstate/status
> cat /sys/devices/system/cpu/intel_pstate/status
>
> And I get this (very small excerpt):
>
> freq_qos_add_request() called for active request
> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
> Failed to add freq constraint for CPU0 (-22)
>
> freq_qos_add_request() called for active request
> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
> Failed to add freq constraint for CPU1 (-22)
>
> ...
>
> I'll attach the whole thing, but it will likely get removed
> from the general list e-mails.
>
> ... Doug

I forgot to mention, other than the error messages,
things seems to work fine.

If anyone wants to see what was the attachment, it
is here (for a few days):

http://www.smythies.com/~doug/temp_kernel/rjw.txt



^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-11-17 16:13   ` Doug Smythies
@ 2019-11-19 14:35     ` Doug Smythies
  2019-11-19 19:17       ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Doug Smythies @ 2019-11-19 14:35 UTC (permalink / raw)
  To: 'Rafael J. Wysocki', 'Linux PM'
  Cc: 'Linux ACPI', 'LKML', 'Viresh Kumar',
	'Sudeep Holla', 'Dmitry Osipenko'

On 2019.11.17 08:13 Doug Smythies wrote:
> On 2019.11.16 23:35 Doug Smythies wrote:

>> Hi Rafael,
>>
>> Not sure, but I think it is this one that
>> causes complaining when I try to set the
>> intel_pstate driver to passive mode.
>> I started from active mode, powersave governor,
>> no HWP.
>>
>> Kernel: 5.4-rc7
>>
>> I did not go back and try previous 5.4 RCs.

After looking at the git tags for this patch,
I tried kernel 5.4-rc2, which was the closest
Kernel I had to before the patch set was added.
It worked fine, as expected.

>> I did try kernel 5.3-rc8, because I already had
>> it installed, and it worked fine.
>>
>> I use a script (for years), run as sudo:
>>
>> doug@s15:~/temp$ cat set_cpu_passive
>> #! /bin/bash
>> cat /sys/devices/system/cpu/intel_pstate/status
>> echo passive > /sys/devices/system/cpu/intel_pstate/status
>> cat /sys/devices/system/cpu/intel_pstate/status
>>
>> And I get this (very small excerpt):
>>
>> freq_qos_add_request() called for active request
>> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
>> CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
>> Failed to add freq constraint for CPU0 (-22)
>>
>> freq_qos_add_request() called for active request
>> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
>> CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
>> Failed to add freq constraint for CPU1 (-22)

Updated summary of previous emails:
This patch or patch set breaks the after boot
ability to change CPU frequency scaling drivers.

Using a workaround of booting with
"intel_pstate=passive" seems to prevent the errors.

Changing between the intel_pstate and intel_cpufreq drivers
(i.e. between active and passive modes)
after boot, either way, causes the errors. i.e.

Failed to add freq constraint for CPU7 (-22)
(2 per CPU per attempt)

This is 100% repeatable.

> I forgot to mention, other than the error messages,
> things seems to work fine.

Correction: It is actually quite bad. Eventually,
there will be a "Segmentation fault (core dumped)",
and then even re-boot gets stuck and the only
recourse seems to be the reset button.

This is not 100% repeatable.

I did this (kernel 5.4-rc8):

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 8ab3170..24c7a6b 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2491,6 +2491,8 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)
 {
        int ret;

+       pr_info("Intel P-state register driver .... \n");
+
        memset(&global, 0, sizeof(global));
        global.max_perf_pct = 100;

@@ -2508,6 +2510,8 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)

 static int intel_pstate_unregister_driver(void)
 {
+       pr_info("Intel P-state unregister driver .... \n");
+
        if (hwp_active)
                return -EBUSY;

And got this (dmesg | grep -i pstate):

[    2.024876] intel_pstate: Intel P-state driver initializing
[    2.024883] intel_pstate: Intel P-state register driver ....

Attempt to change from the booted passive mode to active mode:

[  175.903031] intel_pstate: Intel P-state unregister driver ....
[  175.975543] intel_pstate: Intel P-state register driver ....
[  175.975754]  intel_pstate_register_driver+0x4b/0x90
[  175.975756]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.977728]  intel_pstate_register_driver+0x4b/0x90
[  175.977730]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.979644]  intel_pstate_register_driver+0x4b/0x90
[  175.979647]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.981424]  intel_pstate_register_driver+0x4b/0x90
[  175.981427]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.982428]  intel_pstate_register_driver+0x4b/0x90
[  175.982430]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.983127]  intel_pstate_register_driver+0x4b/0x90
[  175.983128]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.983829]  intel_pstate_register_driver+0x4b/0x90
[  175.983832]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.984434]  intel_pstate_register_driver+0x4b/0x90
[  175.984435]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.985040]  intel_pstate_register_driver+0x4b/0x90
[  175.985041]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.985598]  intel_pstate_register_driver+0x4b/0x90
[  175.985600]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.986178]  intel_pstate_register_driver+0x4b/0x90
[  175.986179]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.986721]  intel_pstate_register_driver+0x4b/0x90
[  175.986723]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.987301]  intel_pstate_register_driver+0x4b/0x90
[  175.987302]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.987828]  intel_pstate_register_driver+0x4b/0x90
[  175.987830]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.988420]  intel_pstate_register_driver+0x4b/0x90
[  175.988421]  ? intel_pstate_unregister_driver+0x31/0x40
[  175.988920]  intel_pstate_register_driver+0x4b/0x90
[  175.988921]  ? intel_pstate_unregister_driver+0x31/0x40

Sometimes I get this:

grep . /sys/devices/system/cpu/intel_pstate/*
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:42

Instead of this:

grep . /sys/devices/system/cpu/intel_pstate/*
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:42
/sys/devices/system/cpu/intel_pstate/no_turbo:0
/sys/devices/system/cpu/intel_pstate/num_pstates:23
/sys/devices/system/cpu/intel_pstate/status:active
/sys/devices/system/cpu/intel_pstate/turbo_pct:18

But do not yet know the exact way to reliably
create it.

This is as far as I got so far.

... Doug



^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-11-19 14:35     ` Doug Smythies
@ 2019-11-19 19:17       ` Rafael J. Wysocki
  2019-11-19 22:13         ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-11-19 19:17 UTC (permalink / raw)
  To: Doug Smythies
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Viresh Kumar,
	Sudeep Holla, Dmitry Osipenko

On Tue, Nov 19, 2019 at 3:35 PM Doug Smythies <dsmythies@telus.net> wrote:
>
> On 2019.11.17 08:13 Doug Smythies wrote:
> > On 2019.11.16 23:35 Doug Smythies wrote:
>
> >> Hi Rafael,
> >>
> >> Not sure, but I think it is this one that
> >> causes complaining when I try to set the
> >> intel_pstate driver to passive mode.
> >> I started from active mode, powersave governor,
> >> no HWP.
> >>
> >> Kernel: 5.4-rc7
> >>
> >> I did not go back and try previous 5.4 RCs.
>
> After looking at the git tags for this patch,
> I tried kernel 5.4-rc2, which was the closest
> Kernel I had to before the patch set was added.
> It worked fine, as expected.
>
> >> I did try kernel 5.3-rc8, because I already had
> >> it installed, and it worked fine.
> >>
> >> I use a script (for years), run as sudo:
> >>
> >> doug@s15:~/temp$ cat set_cpu_passive
> >> #! /bin/bash
> >> cat /sys/devices/system/cpu/intel_pstate/status
> >> echo passive > /sys/devices/system/cpu/intel_pstate/status
> >> cat /sys/devices/system/cpu/intel_pstate/status
> >>
> >> And I get this (very small excerpt):
> >>
> >> freq_qos_add_request() called for active request
> >> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> >> CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
> >> Failed to add freq constraint for CPU0 (-22)
> >>
> >> freq_qos_add_request() called for active request
> >> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> >> CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
> >> Failed to add freq constraint for CPU1 (-22)
>
> Updated summary of previous emails:
> This patch or patch set breaks the after boot
> ability to change CPU frequency scaling drivers.
>
> Using a workaround of booting with
> "intel_pstate=passive" seems to prevent the errors.
>
> Changing between the intel_pstate and intel_cpufreq drivers
> (i.e. between active and passive modes)
> after boot, either way, causes the errors. i.e.
>
> Failed to add freq constraint for CPU7 (-22)
> (2 per CPU per attempt)

These messages come from acpi_processor_ppc_init() and
acpi_thermal_cpufreq_init(), AFAICS, which are invoked by
acpi_processor_notifier() and that is invoked by the
blocking_notifier_call_chain() in cpufreq_online() which tirggers for
new policies after adding the max freq QoS request to
policy->constraints.

The requests added by them should be removed by
acpi_processor_ppc_exit() and acpi_thermal_cpufreq_exit(),
respectively, invoked by the blocking_notifier_call_chain() in
cpufreq_policy_free(), but it looks like that doesn't happen.

However, I now also see that freq_qos_remove_request() doesn't clear
the qos field in req which is should do, so freq_qos_add_request()
will complain and fail if the object pointed to by req is passed to it
again.

I'll send a patch to test for this later today.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-11-19 19:17       ` Rafael J. Wysocki
@ 2019-11-19 22:13         ` Rafael J. Wysocki
  2019-11-20  6:55           ` Doug Smythies
  0 siblings, 1 reply; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-11-19 22:13 UTC (permalink / raw)
  To: Doug Smythies
  Cc: Rafael J. Wysocki, Linux PM, Linux ACPI, LKML, Viresh Kumar,
	Sudeep Holla, Dmitry Osipenko

On Tuesday, November 19, 2019 8:17:05 PM CET Rafael J. Wysocki wrote:
> On Tue, Nov 19, 2019 at 3:35 PM Doug Smythies <dsmythies@telus.net> wrote:
> >
> > On 2019.11.17 08:13 Doug Smythies wrote:
> > > On 2019.11.16 23:35 Doug Smythies wrote:
> >
> > >> Hi Rafael,
> > >>
> > >> Not sure, but I think it is this one that
> > >> causes complaining when I try to set the
> > >> intel_pstate driver to passive mode.
> > >> I started from active mode, powersave governor,
> > >> no HWP.
> > >>
> > >> Kernel: 5.4-rc7
> > >>
> > >> I did not go back and try previous 5.4 RCs.
> >
> > After looking at the git tags for this patch,
> > I tried kernel 5.4-rc2, which was the closest
> > Kernel I had to before the patch set was added.
> > It worked fine, as expected.
> >
> > >> I did try kernel 5.3-rc8, because I already had
> > >> it installed, and it worked fine.
> > >>
> > >> I use a script (for years), run as sudo:
> > >>
> > >> doug@s15:~/temp$ cat set_cpu_passive
> > >> #! /bin/bash
> > >> cat /sys/devices/system/cpu/intel_pstate/status
> > >> echo passive > /sys/devices/system/cpu/intel_pstate/status
> > >> cat /sys/devices/system/cpu/intel_pstate/status
> > >>
> > >> And I get this (very small excerpt):
> > >>
> > >> freq_qos_add_request() called for active request
> > >> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> > >> CPU: 1 PID: 2758 Comm: set_cpu_passive Not tainted 5.4.0-rc7-stock #727
> > >> Failed to add freq constraint for CPU0 (-22)
> > >>
> > >> freq_qos_add_request() called for active request
> > >> WARNING: CPU: 1 PID: 2758 at kernel/power/qos.c:763 freq_qos_add_request+0x4c/0xa0
> > >> CPU: 1 PID: 2758 Comm: set_cpu_passive Tainted: G        W         5.4.0-rc7-stock #727
> > >> Failed to add freq constraint for CPU1 (-22)
> >
> > Updated summary of previous emails:
> > This patch or patch set breaks the after boot
> > ability to change CPU frequency scaling drivers.
> >
> > Using a workaround of booting with
> > "intel_pstate=passive" seems to prevent the errors.
> >
> > Changing between the intel_pstate and intel_cpufreq drivers
> > (i.e. between active and passive modes)
> > after boot, either way, causes the errors. i.e.
> >
> > Failed to add freq constraint for CPU7 (-22)
> > (2 per CPU per attempt)
> 
> These messages come from acpi_processor_ppc_init() and
> acpi_thermal_cpufreq_init(), AFAICS, which are invoked by
> acpi_processor_notifier() and that is invoked by the
> blocking_notifier_call_chain() in cpufreq_online() which tirggers for
> new policies after adding the max freq QoS request to
> policy->constraints.
> 
> The requests added by them should be removed by
> acpi_processor_ppc_exit() and acpi_thermal_cpufreq_exit(),
> respectively, invoked by the blocking_notifier_call_chain() in
> cpufreq_policy_free(), but it looks like that doesn't happen.
> 
> However, I now also see that freq_qos_remove_request() doesn't clear
> the qos field in req which is should do, so freq_qos_add_request()
> will complain and fail if the object pointed to by req is passed to it
> again.
> 
> I'll send a patch to test for this later today.
> 

The patch is appended.  Please test it (on top of 5.4-rc8) and report back.


---
 kernel/power/qos.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: linux-pm/kernel/power/qos.c
===================================================================
--- linux-pm.orig/kernel/power/qos.c
+++ linux-pm/kernel/power/qos.c
@@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_reques
  */
 int freq_qos_remove_request(struct freq_qos_request *req)
 {
+	int ret;
+
 	if (!req)
 		return -EINVAL;
 
@@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_
 		 "%s() called for unknown object\n", __func__))
 		return -EINVAL;
 
-	return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
+	ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
+	req->qos = NULL;
+	req->type = 0;
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(freq_qos_remove_request);
 




^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-11-19 22:13         ` Rafael J. Wysocki
@ 2019-11-20  6:55           ` Doug Smythies
  2019-11-20  9:08             ` Rafael J. Wysocki
  0 siblings, 1 reply; 34+ messages in thread
From: Doug Smythies @ 2019-11-20  6:55 UTC (permalink / raw)
  To: 'Rafael J. Wysocki'
  Cc: 'Rafael J. Wysocki', 'Linux PM',
	'Linux ACPI', 'LKML', 'Viresh Kumar',
	'Sudeep Holla', 'Dmitry Osipenko'

On 2019.11.19 14:14 Rafael J. Wysocki wrote:
> On Tuesday, November 19, 2019 8:17:05 PM CET Rafael J. Wysocki wrote:

...
 
>> However, I now also see that freq_qos_remove_request() doesn't clear
>> the qos field in req which is should do, so freq_qos_add_request()
>> will complain and fail if the object pointed to by req is passed to it
>> again.
>> 
>> I'll send a patch to test for this later today.
>> 
>
> The patch is appended.  Please test it (on top of 5.4-rc8) and report back.
>
> ---
> kernel/power/qos.c |    8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> Index: linux-pm/kernel/power/qos.c
> ===================================================================
> --- linux-pm.orig/kernel/power/qos.c
> +++ linux-pm/kernel/power/qos.c
> @@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_reques
>  */
> int freq_qos_remove_request(struct freq_qos_request *req)
> {
> +	int ret;
> +
> 	if (!req)
> 		return -EINVAL;
> 
> @@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_
> 		 "%s() called for unknown object\n", __func__))
> 		return -EINVAL;
> 
> -	return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> +	ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> +	req->qos = NULL;
> +	req->type = 0;
> +
> +	return ret;
>  }
>  EXPORT_SYMBOL_GPL(freq_qos_remove_request);
 
Yes the patch fixes the problem. Thanks.

I tested several hundred times switching between
passive and active modes with the intel_pstate driver,
including with various CPUs disabled and re-enabled.

... Doug



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS
  2019-11-20  6:55           ` Doug Smythies
@ 2019-11-20  9:08             ` Rafael J. Wysocki
  0 siblings, 0 replies; 34+ messages in thread
From: Rafael J. Wysocki @ 2019-11-20  9:08 UTC (permalink / raw)
  To: Doug Smythies
  Cc: Rafael J. Wysocki, Rafael J. Wysocki, Linux PM, Linux ACPI, LKML,
	Viresh Kumar, Sudeep Holla, Dmitry Osipenko

On Wed, Nov 20, 2019 at 7:55 AM Doug Smythies <dsmythies@telus.net> wrote:
>
> On 2019.11.19 14:14 Rafael J. Wysocki wrote:
> > On Tuesday, November 19, 2019 8:17:05 PM CET Rafael J. Wysocki wrote:
>
> ...
>
> >> However, I now also see that freq_qos_remove_request() doesn't clear
> >> the qos field in req which is should do, so freq_qos_add_request()
> >> will complain and fail if the object pointed to by req is passed to it
> >> again.
> >>
> >> I'll send a patch to test for this later today.
> >>
> >
> > The patch is appended.  Please test it (on top of 5.4-rc8) and report back.
> >
> > ---
> > kernel/power/qos.c |    8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > Index: linux-pm/kernel/power/qos.c
> > ===================================================================
> > --- linux-pm.orig/kernel/power/qos.c
> > +++ linux-pm/kernel/power/qos.c
> > @@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_reques
> >  */
> > int freq_qos_remove_request(struct freq_qos_request *req)
> > {
> > +     int ret;
> > +
> >       if (!req)
> >               return -EINVAL;
> >
> > @@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_
> >                "%s() called for unknown object\n", __func__))
> >               return -EINVAL;
> >
> > -     return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> > +     ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> > +     req->qos = NULL;
> > +     req->type = 0;
> > +
> > +     return ret;
> >  }
> >  EXPORT_SYMBOL_GPL(freq_qos_remove_request);
>
> Yes the patch fixes the problem. Thanks.
>
> I tested several hundred times switching between
> passive and active modes with the intel_pstate driver,
> including with various CPUs disabled and re-enabled.

Thanks a lot!

Let me resend the patch with a changelog and tags.

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2019-11-20  9:09 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
2019-10-17  9:41   ` Viresh Kumar
2019-10-17 14:16     ` Rafael J. Wysocki
2019-10-18  5:41       ` Viresh Kumar
2019-10-24 19:01   ` Leonard Crestez
2019-10-24 19:34     ` Leonard Crestez
2019-11-17  7:34   ` Doug Smythies
2019-11-17 16:13   ` Doug Smythies
2019-11-19 14:35     ` Doug Smythies
2019-11-19 19:17       ` Rafael J. Wysocki
2019-11-19 22:13         ` Rafael J. Wysocki
2019-11-20  6:55           ` Doug Smythies
2019-11-20  9:08             ` Rafael J. Wysocki
2019-10-16 10:47 ` [RFT][PATCH 2/3] cpufreq: Use per-policy " Rafael J. Wysocki
2019-10-16 18:01   ` Dmitry Osipenko
2019-10-17 21:29     ` Dmitry Osipenko
2019-10-18  9:29       ` Viresh Kumar
2019-10-18 15:31         ` Dmitry Osipenko
2019-10-16 10:47 ` [RFT][PATCH 3/3] PM: QoS: Drop frequency QoS types from device PM QoS Rafael J. Wysocki
2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
2019-10-17  9:57   ` Viresh Kumar
2019-10-17  9:59     ` Sudeep Holla
2019-10-17 16:34       ` Rafael J. Wysocki
2019-10-17 16:42         ` Sudeep Holla
2019-10-18  5:44         ` Viresh Kumar
2019-10-18  8:24           ` Rafael J. Wysocki
2019-10-18  8:27             ` Viresh Kumar
2019-10-18  8:30               ` Rafael J. Wysocki
2019-10-18  9:24                 ` Viresh Kumar
2019-10-18  9:26                   ` Rafael J. Wysocki
2019-10-18  9:28                     ` Viresh Kumar
2019-10-17 17:14   ` Sudeep Holla
2019-10-17  9:46 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).