lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100520221742.GB20946@think>
Date:	Thu, 20 May 2010 18:17:42 -0400
From:	Chris Mason <chris.mason@...cle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...e.hu>, axboe@...nel.dk,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] reduce runqueue lock contention

On Thu, May 20, 2010 at 11:23:12PM +0200, Peter Zijlstra wrote:
> On Thu, 2010-05-20 at 23:09 +0200, Peter Zijlstra wrote:
> 
> > int try_to_wake_up(struct task *p, unsigned int mask, wake_flags)
> > {
> >   int state = atomic_read(&p->state);
> > 
> >   do {
> >     if (!(state & mask))
> >       return 0;
> > 
> >     state = atomic_cmpxchg(&p->state, state, TASK_WAKING);
> >   } while (state != TASK_WAKING);
> 
>     cpu = select_task_rq()
> 
> and then somehow see we get set_task_cpu() done without races :-)
> 
> >   /* do this pending queue + ipi thing */
> > 
> >   return 1;
> > }

I tried not to set the task waking, since I was worried about races with
us getting queued somewhere else.  But, I don't have a good handle on
all of that so I kind of chickened out.  That's why my code falls back
to the full ttwu in a few cases.

Do you think the above could be an addition to my patch or that it's
required for my patch to work well?

-chris

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ