Re: [PATCH] Export current_is_keventd() for libphy





On Thu, 7 Dec 2006, Andrew Morton wrote:

We _can_ trust it in the context of

void flush_work(struct work_struct *work)

Yes, but the way the bits are defined, the "pending" bit is not meaningful
as a synchronization event, for example - because _other_ users can't
trust it once they've dispatched the function. So even in the synchronous
run/flush_scheduled_work() kind of situation, you end up having to work
with the fact that nobody _else_ can rely on the data structures, and that
they are designed to work that way..

ho-hum. I'll take a look at turning that into something which compiles,
then I'll convert a few oft-used flush_scheduled_work() callers over to use
it. To do this on a sensible timescale perhaps means that we should export
current_is_keventd(), get the howling hordes off our backs.

Well, I simply committed my work that doesn't guarantee synchronization -
the synchronization can now be added in kernel/workqueue.c any way we
want. It's better than what we used to have, for sure, in both compiling
and solving the practical problem, but also as a "go forward" point.

Linus
-
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/



Relevant Pages

  • ContextBoundObject and [Synchronization]: what calls are from another context?
    ... My understanding is that calls to ContextBoundObjects are checked to see whether the caller is from the same context, and if not, the context rules determine how the call is made. ... For objects with the attribute, the context rules make sure that the caller holds some kind of synchronization object to ensure that only one caller at a time can access objects in the context. ... I thought that BeginInvoke would use a background thread to call the method, and that the calls would come from another context, thus having to take the context lock before proceeding. ... static void Main ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Activesync 4.1 erases contacts instead of saving
    ... because it had happened to me), I cannot trust AS to recover my contacts if ... successful synchronization regardless of which is the source. ... it seems like you deleted some items and after the sync ... -How could I upload the contacts in my desktop to the pocket PC? ...
    (microsoft.public.pocketpc.activesync)
  • Re: Executing a method in a given thread context
    ... As you knoiw, when the callback is run, it is in the context of a ... event in the context of the thread which called Socket.BeginReceive at the ... delivering the message within the correct synchronization context by ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.clr)
  • Re: accessing servlet filters
    ... >> to write a context variable or a sensor variable in a high concurrent ... to execute the very same method with no synchronization constraints! ... Notice that in the same context with the same object but with NO ... the overall latency of all accessing ...
    (comp.lang.java.programmer)
  • Re: A new Critical Section for high contention situations
    ... void enter ... You said "there is no synchroniztion", then, what does synchronization ... You said "there is no contention", ... You mentioned "race conditions" but, ...
    (microsoft.public.win32.programmer.kernel)