Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1626294 > unrolled thread
| Started by | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| First post | 2017-04-19 17:10 +0200 |
| Last post | 2017-04-24 06:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-04-19 17:10 +0200
Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-04-24 06:40 +0200
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2017-04-19 17:10 +0200 |
| Subject | Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature |
| Message-ID | <txZp1-4Zt-39@gated-at.bofh.it> |
On Tue, Mar 14, 2017 at 05:18:52PM +0900, Byungchul Park wrote:
> +/*
> + * Only access local task's data, so irq disable is only required.
> + */
> +static int same_context_xhlock(struct hist_lock *xhlock)
> +{
> + struct task_struct *curr = current;
> +
> + /* In the case of hardirq context */
> + if (curr->hardirq_context) {
> + if (xhlock->hlock.irq_context & 2) /* 2: bitmask for hardirq */
> + return 1;
> + /* In the case of softriq context */
> + } else if (curr->softirq_context) {
> + if (xhlock->hlock.irq_context & 1) /* 1: bitmask for softirq */
> + return 1;
> + /* In the case of process context */
> + } else {
> + if (xhlock->work_id == curr->work_id)
> + return 1;
> + }
> + return 0;
> +}
static bool same_context_xhlock(struct hist_lock *xhlock)
{
return xhlock->hlock.irq_context == task_irq_context(current) &&
xhlock->work_id == current->work_id;
}
[toc] | [next] | [standalone]
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Date | 2017-04-24 06:40 +0200 |
| Message-ID | <tzDX3-25C-7@gated-at.bofh.it> |
| In reply to | #1626294 |
On Wed, Apr 19, 2017 at 05:08:35PM +0200, Peter Zijlstra wrote:
> On Tue, Mar 14, 2017 at 05:18:52PM +0900, Byungchul Park wrote:
> > +/*
> > + * Only access local task's data, so irq disable is only required.
> > + */
> > +static int same_context_xhlock(struct hist_lock *xhlock)
> > +{
> > + struct task_struct *curr = current;
> > +
> > + /* In the case of hardirq context */
> > + if (curr->hardirq_context) {
> > + if (xhlock->hlock.irq_context & 2) /* 2: bitmask for hardirq */
> > + return 1;
> > + /* In the case of softriq context */
> > + } else if (curr->softirq_context) {
> > + if (xhlock->hlock.irq_context & 1) /* 1: bitmask for softirq */
> > + return 1;
> > + /* In the case of process context */
> > + } else {
> > + if (xhlock->work_id == curr->work_id)
> > + return 1;
> > + }
> > + return 0;
> > +}
>
> static bool same_context_xhlock(struct hist_lock *xhlock)
> {
> return xhlock->hlock.irq_context == task_irq_context(current) &&
> xhlock->work_id == current->work_id;
> }
D'oh, thank you.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web