Skip to contentSkip to conversation

drm/ttm: remove ttm_mem_global->queue

PATCH In review Marcin Slusarz 2 participants 2 messages Nov 6, 2012 – Nov 7, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 drm/ttm: remove ttm_mem_global->queue

It's unused.

Cc Thomas Hellstrom <[email protected]>
---
 drivers/gpu/drm/ttm/ttm_memory.c | 1 -
 include/drm/ttm/ttm_memory.h     | 2 --
 2 files changed, 3 deletions(-)
drivers/gpu/drm/ttm/ttm_memory.c +0 -1
index 479c6b0..dbc2def 100644
@@ -367,7 +367,6 @@ int ttm_mem_global_init(struct ttm_mem_global *glob)
 	spin_lock_init(&glob->lock);
 	glob->swap_queue = create_singlethread_workqueue("ttm_swap");
 	INIT_WORK(&glob->work, ttm_shrink_work);
-	init_waitqueue_head(&glob->queue);
 	ret = kobject_init_and_add(
 		&glob->kobj, &ttm_mem_glob_kobj_type, ttm_get_kobj(), "memory_accounting");
 	if (unlikely(ret != 0)) {
include/drm/ttm/ttm_memory.h +0 -2
index d6d1da4..72dcbe8 100644
@@ -60,7 +60,6 @@ struct ttm_mem_shrink {
  * for the GPU, and this will otherwise block other workqueue tasks(?)
  * At this point we use only a single-threaded workqueue.
  * @work: The workqueue callback for the shrink queue.
- * @queue: Wait queue for processes suspended waiting for memory.
  * @lock: Lock to protect the @shrink - and the memory accounting members,
  * that is, essentially the whole structure with some exceptions.
  * @zones: Array of pointers to accounting zones.
@@ -80,7 +79,6 @@ struct ttm_mem_global {
 	struct ttm_mem_shrink *shrink;
 	struct workqueue_struct *swap_queue;
 	struct work_struct work;
-	wait_queue_head_t queue;
 	spinlock_t lock;
 	struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES];
 	unsigned int num_zones;
Signature · 1 line
1.7.12
Reviewed-by on v1 4/4
#1 lore raw
Quoted 34 lines · Marcin Slusarz

It's unused.

Cc Thomas Hellstrom <[email protected]>
---
  drivers/gpu/drm/ttm/ttm_memory.c | 1 -
  include/drm/ttm/ttm_memory.h     | 2 --
  2 files changed, 3 deletions(-)
drivers/gpu/drm/ttm/ttm_memory.c +0 -1
index 479c6b0..dbc2def 100644
@@ -367,7 +367,6 @@ int ttm_mem_global_init(struct ttm_mem_global *glob)
  	spin_lock_init(&glob->lock);
  	glob->swap_queue = create_singlethread_workqueue("ttm_swap");
  	INIT_WORK(&glob->work, ttm_shrink_work);
-	init_waitqueue_head(&glob->queue);
  	ret = kobject_init_and_add(
  		&glob->kobj, &ttm_mem_glob_kobj_type, ttm_get_kobj(), "memory_accounting");
  	if (unlikely(ret != 0)) {
include/drm/ttm/ttm_memory.h +0 -1
index d6d1da4..72dcbe8 100644
@@ -60,7 +60,6 @@ struct ttm_mem_shrink {
   * for the GPU, and this will otherwise block other workqueue tasks(?)
   * At this point we use only a single-threaded workqueue.
   * @work: The workqueue callback for the shrink queue.
- * @queue: Wait queue for processes suspended waiting for memory.
   * @lock: Lock to protect the @shrink - and the memory accounting members,
   * that is, essentially the whole structure with some exceptions.
   * @zones: Array of pointers to accounting zones.

include/drm/ttm/ttm_memory.h struct ttm_mem_global { · line 84

Quoted 7 lines
include/drm/ttm/ttm_memory.h +0 -1
@@ -80,7 +79,6 @@ struct ttm_mem_global {
  	struct ttm_mem_shrink *shrink;
  	struct workqueue_struct *swap_queue;
  	struct work_struct work;
-	wait_queue_head_t queue;
  	spinlock_t lock;
  	struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES];
  	unsigned int num_zones;