Skip to contentSkip to conversation

regmap: Cache async work structures

PATCH New Mark Brown 1 participant 1 message Oct 7, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regmap: Cache async work structures

From: Mark Brown <[email protected]>

Rather than allocating and deallocating the structures used to manage async transfers each time we do one keep the structures around as long as the regmap is around. This should provide a small performance improvement.

---
 drivers/base/regmap/internal.h |  2 +-
 drivers/base/regmap/regmap.c   | 59 +++++++++++++++++++++++-------------------
 2 files changed, 34 insertions(+), 27 deletions(-)
drivers/base/regmap/internal.h +1 -1
index 9010614..63c22bc 100644
@@ -44,7 +44,6 @@ struct regmap_format {
 
 struct regmap_async {
 	struct list_head list;
-	struct work_struct cleanup;
 	struct regmap *map;
 	void *work_buf;
 };
@@ -67,6 +66,7 @@ struct regmap {
 	spinlock_t async_lock;
 	wait_queue_head_t async_waitq;
 	struct list_head async_list;
+	struct list_head async_free;
 	int async_ret;
 
 #ifdef CONFIG_DEBUG_FS
drivers/base/regmap/regmap.c +33 -26

113 lines not on this page · raw message

Signature · 1 line
1.8.4.rc3