Thread (20 messages) 20 messages, 4 authors, 2019-01-29

Re: [PATCH v3 5/5] psi: introduce psi monitor

From: Peter Zijlstra <peterz@infradead.org>
Date: 2019-01-29 10:44:53
Also in: linux-doc, linux-mm, lkml

On Thu, Jan 24, 2019 at 01:15:18PM -0800, Suren Baghdasaryan wrote:
 static void psi_update_work(struct work_struct *work)
 {
 	struct delayed_work *dwork;
 	struct psi_group *group;
+	bool first_pass = true;
+	u64 next_update;
+	u32 change_mask;
+	int polling;
 	bool nonidle;
+	u64 now;
 
 	dwork = to_delayed_work(work);
 	group = container_of(dwork, struct psi_group, clock_work);
 
+	now = sched_clock();
+
+	mutex_lock(&group->update_lock);
actually acquiring a mutex can take a fairly long while; would it not
make more sense to take the @now timestanp _after_ it, instead of
before?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help