Re: [rfc/patch] wake_up_info() draft ...

From: Manfred Spraul
Date: Fri Jan 02 2004 - 04:36:10 EST


Davide Libenzi wrote:

On Fri, 2 Jan 2004, Manfred Spraul wrote:



Hi Davide,



Hi Manfred,




I think the patch adds unnecessary bloat, and mandates one particular use of the wait queue info interface.



why are you saying so?



sizeof(waitqueue_t) increases.

@@ -1658,6 +1659,8 @@
unsigned flags;
curr = list_entry(tmp, wait_queue_t, task_list);
flags = curr->flags;
+ if (info)
+ dup_wait_info(&curr->info, info);
if (curr->func(curr, mode, sync) &&
(flags & WQ_FLAG_EXCLUSIVE) &&
!--nr_exclusive)

IMHO these two lines belong into curr->func, perhaps with a reference implementation that uses

struct wait_queue_entry_info {
wait_queue_t wait;
struct wait_info info;
};

We have already a callback pointer, so why add special case code into the common codepaths? Custom callbacks could handle the special case of an info wakeup.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/