Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +
> +/*
> + * No contention. Irq disable is only required.
> + */
> +static int same_context_plock(struct pend_lock *plock)
> +{
> +       struct task_struct *curr = current;
> +       int cpu = smp_processor_id();
> +
> +       /* In the case of hardirq context */
> +       if (curr->hardirq_context) {
> +               if (plock->hardirq_id != per_cpu(hardirq_id, cpu) ||
> +                   plock->hardirq_context != curr->hardirq_context)
> +                       return 0;
> +       /* In the case of softriq context */
> +       } else if (curr->softirq_context) {
> +               if (plock->softirq_id != per_cpu(softirq_id, cpu) ||
> +                   plock->softirq_context != curr->softirq_context)
> +                       return 0;
> +       /* In the case of process context */
> +       } else {
> +               if (plock->hardirq_context != 0 ||
> +                   plock->softirq_context != 0)
> +                       return 0;
> +       }
> +       return 1;
> +}
>

I have not read the code yet...
but different work functions in workqueues are different "contexts" IMO,
does commit operation work well in work functions?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]