lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 03/12] scs: add support for stack usage debugging
On Wed, Apr 22, 2020 at 06:46:02PM +0100, Will Deacon wrote:
> > +static void scs_check_usage(struct task_struct *tsk)
> > +{
> > + static unsigned long highest;
> > + unsigned long used = __scs_used(tsk);
> > + unsigned long prev;
> > + unsigned long curr = highest;
> > +
> > + while (used > curr) {
> > + prev = cmpxchg(&highest, curr, used);
>
> I think this can be cmpxchg_relaxed(), since we don't care about ordering
> here afaict.

Sure, I'll change this in v13. Thanks.

Sami

\
 
 \ /
  Last update: 2020-04-23 01:54    [W:0.185 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site