Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp821925pxb; Thu, 26 Aug 2021 15:56:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTt8gdU3CbXgBwVl0qPKpC9YNy6bPr3xgUFuJZHDFHcLgjWeeq39kjzmCFT/AlGNgkUVxn X-Received: by 2002:a17:906:994f:: with SMTP id zm15mr6863473ejb.480.1630018598850; Thu, 26 Aug 2021 15:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630018598; cv=none; d=google.com; s=arc-20160816; b=OlGw/2UYLckXUtI0KF8aJUcapoZ+YY7e94odiA3Wah8eeNEYr2UbSPiJV2PRuGtVS5 +6IDZWBR1csrofu2vzDmVoBRKIboBtjYsQLA+ldCmNXBxTNI1xKyouCuzbnbf9lcINd+ IuLz7L45JjOpiWWyYc8XiAmGUoEZNITyNhJG25/P5yH3SBIpN98vIfE8W2fzTcVlBify nIqlUOzSH1kN90WS9AXr0S6Xwqcd6yizLmoF5nBUf2ruzZr98xtCbXyPgIjGtshkYX95 w3CfSAcdqd2yREIUdVotdVjWJ+9eDnL9XkomXCmPM3G6hOUEgpvpM5a5qAcNaeXpn9m3 rtXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=erq1XqrY8ZVsMbLH+bOTHYcfIujF9uYA/N4nT8HFyFo=; b=QVFO3a0whIvtvUSd3nGONAjKNwHOebjujeJ4B0JVQgHc4p6PBhXAxVLBRFqj/b3ZV8 Qj1oLjyo7btHBnd3snVSuS9NaJeVgQQrx7145ba4XN8z390FpU1muCMOy6c78sDcR9su rphcTeK4DS87ABX7zqvheTIt2T6Ad3gkeuWDx1wvzxTzojCyF1nAcYtkOupugqbaJhgk dzuqa3Si4mOHrp2p6d0ZnWQWCpFsQAO6wt/FjKA1TZfCbt00amBc2Kg2PeCBxZ+7V8dt Y1Ri4xjT0VYiArtBvXXzvwViTeEjI6yaMqRvgDuKffWyZvwzVz0pD0dViG+KPt2hCdmd 2PjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Lh57LYje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si4269820edx.80.2021.08.26.15.56.01; Thu, 26 Aug 2021 15:56:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Lh57LYje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243826AbhHZWxz (ORCPT + 99 others); Thu, 26 Aug 2021 18:53:55 -0400 Received: from out0.migadu.com ([94.23.1.103]:44384 "EHLO out0.migadu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231307AbhHZWxz (ORCPT ); Thu, 26 Aug 2021 18:53:55 -0400 Date: Fri, 27 Aug 2021 06:53:51 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1630018384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=erq1XqrY8ZVsMbLH+bOTHYcfIujF9uYA/N4nT8HFyFo=; b=Lh57LYjeZZhENIdAMjgBYwRj/m21dqYay8a3yO6Wu3VikEz+eTpTlpOXFNbptmkbvkNkxz okyZOOihNDt85VzogX3T+1lYXmYgipQ/R1T0wVNQ5oxu1uDsoqqmjeCTeW9nuMH9nv9i6C yXoFveRQKl0INhbz0tc/ffp9z+vVEAY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Thomas Gleixner Cc: Sebastian Andrzej Siewior , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, tao.zhou@linux.dev Subject: Re: [PATCH] sched: Fix get_push_task() vs migrate_disable() Message-ID: References: <20210826133738.yiotqbtdaxzjsnfj@linutronix.de> <87k0k82dzq.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k0k82dzq.ffs@tglx> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: tao.zhou@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Thu, Aug 26, 2021 at 09:38:17PM +0200, Thomas Gleixner wrote: > Tao, > > On Fri, Aug 27 2021 at 00:24, Tao Zhou wrote: > > On Thu, Aug 26, 2021 at 03:37:38PM +0200, Sebastian Andrzej Siewior wrote: > >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > >> index e205b63d6db07..32a4945730a9b 100644 > >> --- a/kernel/sched/sched.h > >> +++ b/kernel/sched/sched.h > >> @@ -2259,6 +2259,9 @@ static inline struct task_struct *get_push_task(struct rq *rq) > >> if (p->nr_cpus_allowed == 1) > >> return NULL; > >> > >> + if (p->migration_disabled) > >> + return NULL; > > > > Not much I can restore here.. > > > > Is is_migration_disabled(p) be more correct to check migration > > disable. > > Kinda, but it's not an issue here because get_push_task() is only available when > CONFIG_SMP=y which makes p->migration_disabled available as well. > > > And get_push_task() being called in pull_rt_task() has checked migration > > disable first and then call get_push_task(). That means this check in > > get_push_task() in patch is a second repeatly check. > > No. The checks are for two different tasks... Aha, yes. I lost here. Thanks for your reply. > Thanks, > > tglx Thanks, Tao