From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbdBMPx7 (ORCPT ); Mon, 13 Feb 2017 10:53:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbdBMPwd (ORCPT ); Mon, 13 Feb 2017 10:52:33 -0500 Date: Mon, 13 Feb 2017 16:52:30 +0100 From: Oleg Nesterov To: Peter Zijlstra Cc: Byungchul Park , mingo@kernel.org, neilb@suse.de, nab@linux-iscsi.org, viro@zeniv.linux.org.uk, ying.huang@intel.com, shli@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 8/9] sched: Don't reinvent the wheel but use existing llist API Message-ID: <20170213155229.GA1663@redhat.com> References: <1486970469-30917-1-git-send-email-byungchul.park@lge.com> <1486970469-30917-9-git-send-email-byungchul.park@lge.com> <20170213100457.GL6515@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170213100457.GL6515@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 13 Feb 2017 15:52:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.