From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD2C9ECDE5F for ; Mon, 23 Jul 2018 16:35:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72F0220852 for ; Mon, 23 Jul 2018 16:35:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F0220852 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388716AbeGWRhH (ORCPT ); Mon, 23 Jul 2018 13:37:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52630 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388283AbeGWRhH (ORCPT ); Mon, 23 Jul 2018 13:37:07 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6NGU7fc016151 for ; Mon, 23 Jul 2018 12:35:05 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kdha9w89a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Jul 2018 12:35:04 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jul 2018 17:30:00 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 23 Jul 2018 17:29:57 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6NGTuMW39387146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Jul 2018 16:29:56 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C78EA405B; Mon, 23 Jul 2018 19:30:11 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 694AEA4040; Mon, 23 Jul 2018 19:30:10 +0100 (BST) Received: from linux.vnet.ibm.com (unknown [9.40.192.68]) by d06av23.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 23 Jul 2018 19:30:10 +0100 (BST) Date: Mon, 23 Jul 2018 09:29:54 -0700 From: Srikar Dronamraju To: Peter Zijlstra Cc: Ingo Molnar , LKML , Mel Gorman , Rik van Riel , Thomas Gleixner Subject: Re: [PATCH v2 00/19] Fixes for sched/numa_balancing Reply-To: Srikar Dronamraju References: <1529514181-9842-1-git-send-email-srikar@linux.vnet.ibm.com> <20180723135700.GX2458@hirez.programming.kicks-ass.net> <20180723150954.GI30345@linux.vnet.ibm.com> <20180723152147.GE2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20180723152147.GE2494@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18072316-0020-0000-0000-000002AA0480 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072316-0021-0000-0000-000020F690F7 Message-Id: <20180723162954.GA2699@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-23_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=789 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807230186 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra [2018-07-23 17:21:47]: > On Mon, Jul 23, 2018 at 08:09:55AM -0700, Srikar Dronamraju wrote: > > > > > sched/numa: Stop multiple tasks from moving to the cpu at the same time > > > > This patch has go-ahead from Mel and Rik and no outstanding comments. > > I left it out because it's part of the big xchg() mess. > > In particular: > > + if (xchg(&rq->numa_migrate_on, 1)) > + return; > + > + if (env->best_cpu != -1) { > + rq = cpu_rq(env->best_cpu); > + WRITE_ONCE(rq->numa_migrate_on, 0); > + } > > I'm again confused by clearing numa_migrate_on at this point.. First task choose a cpu to swap/migrate, sets the cpu to best_cpu and also numa_migrate_on. Next it finds a better cpu to swap/move. Now if the task is able to move to the better cpu, then it should clear numa_migrate_on on the previous best_cpu. If we dont reset numa_migrate_on on finding a better cpu, the numa_migrate_on stays set for the previous cpu, causing previous cpu to never be a target of numa balance. > > > > > sched/numa: Updation of scan period need not be in lock > > > > I didnt see any comments for this apart from an ack from Rik. > > + It thought it was trivial and shouldnt have any side-effect. > > Oh, my bad I actually have this one. >