Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579904

Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing llist API

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing llist API
Date 2017-02-13 17:00 +0100
Message-ID <tarcJ-5Fx-1@gated-at.bofh.it> (permalink)
References <tajfc-zU-3@gated-at.bofh.it> <tajfc-zU-5@gated-at.bofh.it> <talK2-2iF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/13, Peter Zijlstra wrote:
>
> On Mon, Feb 13, 2017 at 04:21:08PM +0900, Byungchul Park wrote:
> > +	llist_for_each_entry(p, llist, wake_entry)
> > +		ttwu_do_activate(rq, p, p->sched_remote_wakeup ? WF_MIGRATED : 0, &rf);
>
> I think this suffers the exact same problem the others did. After
> ttwu_do_activate() the llist entry can be reused, so doing list_next()
> after it is flaky.

llist_for_each_entry_safe() should work, I guess.

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 8/9] sched: Don't reinvent the wheel but use existing llist API Byungchul Park <byungchul.park@lge.com> - 2017-02-13 08:30 +0100
  Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing  llist API Peter Zijlstra <peterz@infradead.org> - 2017-02-13 11:10 +0100
    Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing  llist API Oleg Nesterov <oleg@redhat.com> - 2017-02-13 17:00 +0100
      Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing  llist API Byungchul Park <byungchul.park@lge.com> - 2017-02-14 00:10 +0100
    Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing  llist API Byungchul Park <byungchul.park@lge.com> - 2017-02-14 00:10 +0100

csiph-web