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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 A5930C4332D for ; Thu, 19 Mar 2020 08:52:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 700502072D for ; Thu, 19 Mar 2020 08:52:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 700502072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0D5446B0003; Thu, 19 Mar 2020 04:52:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 086C86B0005; Thu, 19 Mar 2020 04:52:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB75E6B0006; Thu, 19 Mar 2020 04:52:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id D31C16B0003 for ; Thu, 19 Mar 2020 04:52:31 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8474E612C for ; Thu, 19 Mar 2020 08:52:31 +0000 (UTC) X-FDA: 76611495702.30.spark27_8a6a47b59635c X-HE-Tag: spark27_8a6a47b59635c X-Filterd-Recvd-Size: 5244 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Mar 2020 08:52:30 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02J8WMnu018846 for ; Thu, 19 Mar 2020 04:52:30 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2yu7ad39ws-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Mar 2020 04:52:30 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Mar 2020 08:52:28 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 19 Mar 2020 08:52:24 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02J8qMSx54657268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2020 08:52:22 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0EE2811C05B; Thu, 19 Mar 2020 08:52:22 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9D1611C058; Thu, 19 Mar 2020 08:52:17 +0000 (GMT) Received: from [9.85.82.238] (unknown [9.85.82.238]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 19 Mar 2020 08:52:17 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks From: Sachin Sant In-Reply-To: Date: Thu, 19 Mar 2020 14:22:13 +0530 Cc: bharata@linux.ibm.com, Nathan Lynch , Srikar Dronamraju , linuxppc-dev@lists.ozlabs.org, Michal Hocko , Pekka Enberg , linux-mm@kvack.org, Kirill Tkhai , David Rientjes , Christopher Lameter , Mel Gorman , Joonsoo Kim Content-Transfer-Encoding: quoted-printable References: <20200318144220.18083-1-vbabka@suse.cz> <20200318160610.GD26049@in.ibm.com> To: Vlastimil Babka X-Mailer: Apple Mail (2.3445.104.11) X-TM-AS-GCONF: 00 x-cbid: 20031908-0008-0000-0000-0000035FE18C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20031908-0009-0000-0000-00004A813E9D Message-Id: <0F67B5AA-96DF-4977-BDC6-D72959B3F7EF@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-19_01:2020-03-18,2020-03-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 adultscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=747 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003190037 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > OK how about this version? It's somewhat ugly, but important is that = the fast > path case (c->page exists) is unaffected and another common case = (c->page is > NULL, but node is NUMA_NO_NODE) is just one extra check - impossible = to avoid at > some point anyway. >=20 I attempted the suggested tests. Test 1: March 18 linux-next + Patch 1 [1] + Patch 2 [2] Machine boots fine. numactl o/p after boot: # numactl -H available: 2 nodes (0-1) node 0 cpus: node 0 size: 0 MB node 0 free: 0 MB node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 = 23 24 25 26 27 28 29 30 31 node 1 size: 35631 MB node 1 free: 32724 MB node distances: node 0 1 0: 10 40 1: 40 10 # Test 2: Code base as used in Test 1 + 3 patch series from Srikar [3] Machine boots fine. numactl o/p after boot: # numactl -H available: 1 nodes (1) node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 = 23 24 25 26 27 28 29 30 31 node 1 size: 35631 MB node 1 free: 32711 MB node distances: node 1 1: 10 # Thanks! -Sachin [1] = https://lore.kernel.org/linux-mm/e060ad43-ff4e-0e59-2e64-ce8a4916ec70@suse= .cz/T/#mb8d0a358dc5c5fb9661fa45047072a92c510faf2 [2] = https://lore.kernel.org/linux-mm/e060ad43-ff4e-0e59-2e64-ce8a4916ec70@suse= .cz/T/#mce342e54a95ce2ee3043901e52d70ee2fd94c516 [3] = https://lore.kernel.org/linux-mm/20200311110237.5731-1-srikar@linux.vnet.i= bm.com/=