drm/scheduler: fix documentation by replacing rq_list with sched_list
Subsystems (3)
PATCH 1/1 drm/scheduler: fix documentation by replacing rq_list with sched_list
This also replaces old artifacts with a correct one in drm_sched_entity_init() declaration
--- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/scheduler/sched_entity.c +1 -1
@@ -45,7 +45,7 @@* @guilty: atomic_t set to 1 when a job on this queue * is found to be guilty causing a timeout * -* Note: the rq_list should have atleast one element to schedule +* Note: the sched_list should have atleast one element to schedule * the entity * * Returns 0 on success or a negative error code on failure.
include/drm/gpu_scheduler.h +5 -5
@@ -52,9 +52,9 @@ enum drm_sched_priority {* @list: used to append this struct to the list of entities in the * runqueue. * @rq: runqueue on which this entity is currently scheduled. -* @rq_list: a list of run queues on which jobs from this entity can -* be scheduled -* @num_rq_list: number of run queues in the rq_list +* @sched_list: a list of drm_gpu_schedulers on which jobs from this entity can +* be scheduled +* @num_sched_list: number of drm_gpu_schedulers in the sched_list. * @rq_lock: lock to modify the runqueue to which this entity belongs. * @job_queue: the list of jobs of this entity. * @fence_seq: a linearly increasing seqno incremented with each
@@ -81,8 +81,8 @@ enum drm_sched_priority {struct drm_sched_entity {struct list_head list;struct drm_sched_rq *rq; -unsigned int num_sched_list;struct drm_gpu_scheduler **sched_list; +unsigned int num_sched_list;enum drm_sched_priority priority;spinlock_t rq_lock;
@@ -315,7 +315,7 @@ void drm_sched_rq_remove_entity(struct drm_sched_rq *rq,int drm_sched_entity_init (struct drm_sched_entity *entity,enum drm_sched_priority priority,struct drm_gpu_scheduler **sched_list, -unsigned int num_rq_list, +unsigned int num_sched_list,atomic_t *guilty);long drm_sched_entity_flush (struct drm_sched_entity *entity,long timeout);void drm_sched_entity_fini (struct drm_sched_entity *entity);
Signature · 6 lines
2.24.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 16.01.20 um 15:43 schrieb Nirmoy Das:
Quoted 4 lines
This also replaces old artifacts with a correct one in
drm_sched_entity_init()declarationSigned-off-by Nirmoy Das <[email protected]>
Quoted 46 lines
--- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/scheduler/sched_entity.c +1
-1@@ -45,7 +45,7 @@* @guilty: atomic_t set to 1 when a job on this queue * is found to be guilty causing a timeout * -* Note: the rq_list should have atleast one element to schedule +* Note: the sched_list should have atleast one element to schedule * the entity * * Returns 0 on success or a negative error code on failure. include/drm/gpu_scheduler.h +4
-4@@ -52,9 +52,9 @@ enum drm_sched_priority {* @list: used to append this struct to the list of entities in the * runqueue. * @rq: runqueue on which this entity is currently scheduled. -* @rq_list: a list of run queues on which jobs from this entity can -* be scheduled -* @num_rq_list: number of run queues in the rq_list +* @sched_list: a list of drm_gpu_schedulers on which jobs from this entity can +* be scheduled +* @num_sched_list: number of drm_gpu_schedulers in the sched_list. * @rq_lock: lock to modify the runqueue to which this entity belongs. * @job_queue: the list of jobs of this entity. * @fence_seq: a linearly increasing seqno incremented with each @@ -81,8 +81,8 @@ enum drm_sched_priority {struct drm_sched_entity {struct list_head list;struct drm_sched_rq *rq; -unsigned int num_sched_list;struct drm_gpu_scheduler **sched_list; +unsigned int num_sched_list;enum drm_sched_priority priority;spinlock_t rq_lock;
include/drm/gpu_scheduler.h void drm_sched_rq_remove_entity(struct drm_sched_rq *rq, · line 321
Quoted 8 lines
include/drm/gpu_scheduler.h +1
-1@@ -315,7 +315,7 @@ void drm_sched_rq_remove_entity(struct drm_sched_rq *rq,int drm_sched_entity_init (struct drm_sched_entity *entity,enum drm_sched_priority priority,struct drm_gpu_scheduler **sched_list, -unsigned int num_rq_list, +unsigned int num_sched_list,atomic_t *guilty);long drm_sched_entity_flush (struct drm_sched_entity *entity,long timeout);void drm_sched_entity_fini (struct drm_sched_entity *entity);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 14 lines · Nirmoy Das
This also replaces old artifacts with a correct one in
drm_sched_entity_init()declarationSigned-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/scheduler/sched_entity.c +0
-0
drivers/gpu/drm/scheduler/sched_entity.c line 48
Quoted 5 lines
drivers/gpu/drm/scheduler/sched_entity.c +1
-1@@ -45,7 +45,7 @@* @guilty: atomic_t set to 1 when a job on this queue * is found to be guilty causing a timeout * -* Note: the rq_list should have atleast one element to schedule +* Note: the sched_list should have atleast one element to schedule
"atleast" --> "at least".
Quoted 8 lines
drivers/gpu/drm/scheduler/sched_entity.c +0
-0* the entity * * Returns 0 on success or a negative error code on failure. include/drm/gpu_scheduler.h +0
-0
include/drm/gpu_scheduler.h enum drm_sched_priority { · line 56
Quoted 8 lines
include/drm/gpu_scheduler.h +2
-3@@ -52,9 +52,9 @@ enum drm_sched_priority {* @list: used to append this struct to the list of entities in the * runqueue. * @rq: runqueue on which this entity is currently scheduled. -* @rq_list: a list of run queues on which jobs from this entity can -* be scheduled -* @num_rq_list: number of run queues in the rq_list +* @sched_list: a list of drm_gpu_schedulers on which jobs from this entity can +* be scheduled
I had to read this a few times to understand it. I wonder if splitting it into two sentences would make it clearer:
"A list of schedulers (drm_gpu_schedulers). Jobs from this entity,
can be scheduled on any scheduler on this list."
Regards,
Luben
Quoted 16 lines
include/drm/gpu_scheduler.h +2
-1+* @num_sched_list: number of drm_gpu_schedulers in the sched_list. * @rq_lock: lock to modify the runqueue to which this entity belongs. * @job_queue: the list of jobs of this entity. * @fence_seq: a linearly increasing seqno incremented with each @@ -81,8 +81,8 @@ enum drm_sched_priority {struct drm_sched_entity {struct list_head list;struct drm_sched_rq *rq; -unsigned int num_sched_list;struct drm_gpu_scheduler **sched_list; +unsigned int num_sched_list;enum drm_sched_priority priority;spinlock_t rq_lock;
include/drm/gpu_scheduler.h void drm_sched_rq_remove_entity(struct drm_sched_rq *rq, · line 321
Quoted 8 lines
include/drm/gpu_scheduler.h +1
-1@@ -315,7 +315,7 @@ void drm_sched_rq_remove_entity(struct drm_sched_rq *rq,int drm_sched_entity_init (struct drm_sched_entity *entity,enum drm_sched_priority priority,struct drm_gpu_scheduler **sched_list, -unsigned int num_rq_list, +unsigned int num_sched_list,atomic_t *guilty);long drm_sched_entity_flush (struct drm_sched_entity *entity,long timeout);void drm_sched_entity_fini (struct drm_sched_entity *entity);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Luben,
Quoted 3 lines · Luben Tuikov
Quoted 2 lines
- * Note: the
rq_listshould have atleast one element to schedule
+ * Note: thesched_listshould have atleast one element to schedule"atleast" --> "at least".
Always a tricky one to catch, Thanks!
I will create a patch and ask Alex to squash with this one.
Quoted 9 lines
Quoted 4 lines
- * @num_rq_list: number of run queues in the
rq_list
+ * @sched_list: a list ofdrm_gpu_schedulerson which jobs from this entity can
+ * be scheduledI had to read this a few times to understand it. I wonder if splitting it into two sentences would make it clearer:
"A list of schedulers (
drm_gpu_schedulers). Jobs from this entity,
can be scheduled on any scheduler on this list."
I don't know, both feels right to me. Please create a patch if you think this splitting makes it more clearer.
Regards,
Nirmoy
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 12 lines · Nirmoy
Hi Luben,
Quoted 3 lines · Luben Tuikov
Quoted 2 lines
- * Note: the
rq_listshould have atleast one element to schedule
+ * Note: thesched_listshould have atleast one element to schedule"atleast" --> "at least".
Always a tricky one to catch, Thanks!
I will create a patch and ask Alex to squash with this one.Quoted 4 lines
Quoted 4 lines
- * @num_rq_list: number of run queues in the
rq_list
+ * @sched_list: a list ofdrm_gpu_schedulerson which jobs from this entity can
+ * be scheduled
Quoted 8 lines
Quoted 5 lines
I had to read this a few times to understand it. I wonder if splitting it into two sentences would make it clearer:
"A list of schedulers (
drm_gpu_schedulers). Jobs from this entity,
can be scheduled on any scheduler on this list."I don't know, both feels right to me. Please create a patch if you think this splitting makes it more clearer.
Oh, god, since you're submitting a patch to fix "atleast" to "at least", it would've been good to also fix this.
But you chose not to do it. Sure, you understand it, but making it more clear, surely shows attention to detail and thinking process. And it would help others to maintain the driver and contribute. Making it more obfuscated, by bunching up what acts and what, makes it difficult to understand.
I had to read this sentence a few times to separate the entities, what acts on what, in order to understand the description.
Bunching this up into a single sentence, invariably makes the documentation *more difficult* to understand. Breaking it up into two sentences, makes it much easier to understand. For instance,
The first sentences describes a single object: the list:
"A list of schedulers (drm_gpu_schedulers)."
The second sentence describes the jobs, that they can be scheduled on any scheduler of the previously talked about list:
"Jobs from this entity, can be scheduled on any scheduler on this list."
Why would you refuse to also update the documentation, as part of your spelling mistake patch, is beyond me. It only makes sense to make things better for other people to understand.
And this is how well-written documentation dies.
Regards,
Luben
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx