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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,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 406F2C00449 for ; Wed, 3 Oct 2018 13:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D82C92082A for ; Wed, 3 Oct 2018 13:16:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D82C92082A 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 S1726871AbeJCUEW (ORCPT ); Wed, 3 Oct 2018 16:04:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47218 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbeJCUEW (ORCPT ); Wed, 3 Oct 2018 16:04:22 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w93DDsYm096310 for ; Wed, 3 Oct 2018 09:15:59 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mvwcc3eac-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Oct 2018 09:15:59 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Oct 2018 14:15:57 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Oct 2018 14:15:53 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w93DFqTG63045744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Oct 2018 13:15:52 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2A8E4C059; Wed, 3 Oct 2018 16:15:32 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1DD2E4C046; Wed, 3 Oct 2018 16:15:31 +0100 (BST) Received: from linux.vnet.ibm.com (unknown [9.199.54.87]) by d06av22.portsmouth.uk.ibm.com (Postfix) with SMTP; Wed, 3 Oct 2018 16:15:30 +0100 (BST) Date: Wed, 3 Oct 2018 18:45:49 +0530 From: Srikar Dronamraju To: Mel Gorman Cc: Peter Zijlstra , Ingo Molnar , Jirka Hladky , Rik van Riel , LKML , Linux-MM Subject: Re: [PATCH 2/2] mm, numa: Migrate pages to local nodes quicker early in the lifetime of a task Reply-To: Srikar Dronamraju References: <20181001100525.29789-1-mgorman@techsingularity.net> <20181001100525.29789-3-mgorman@techsingularity.net> <20181002124149.GB4593@linux.vnet.ibm.com> <20181002135459.GA7003@techsingularity.net> <20181002173005.GD4593@linux.vnet.ibm.com> <20181002182248.GB7003@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20181002182248.GB7003@techsingularity.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18100313-0028-0000-0000-00000301FE16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100313-0029-0000-0000-000023BC34D7 Message-Id: <20181003131549.GB4488@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-03_07:,, 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=996 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810030129 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > if we want to prioritize STREAM like workloads (i.e private faults) one simpler > > fix could be to change the quadtraic equation > > > > from: > > if (!cpupid_pid_unset(last_cpupid) && > > cpupid_to_nid(last_cpupid) != dst_nid) > > return false; > > to: > > if (!cpupid_pid_unset(last_cpupid) && > > cpupid_to_nid(last_cpupid) == dst_nid) > > return true; > > > > i.e to say if the group tasks likely consolidated to a node or the task was > > moved to a different node but access were private, just move the memory. > > > > The drawback though is we keep pulling memory everytime the task moves > > across nodes. (which is probably restricted for long running tasks to some > > extent by your fix) > > > > This has way more consequences as it changes the behaviour for the entire > lifetime of the workload. It could cause excessive migrations in the case > where a machine is almost fully utilised and getting load balanced or in > cases where tasks are pulled frequently cross-node (e.g. worker thread > model or a pipelined computation). > > I'm only looking to address the case where the load balancer spreads a > workload early and the memory should move to the new node quickly. If it > turns out there are cases where that decision is wrong, it gets remedied > quickly but if your proposal is ever wrong, the system doesn't recover. > Agree. -- Thanks and Regards Srikar Dronamraju