Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1866171imm; Thu, 2 Aug 2018 02:18:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeqiWKqST6jN5cvc4nNo+vV6lYqdgRaHelelIQtSnm3UTqP3xAwAit9bjuHUM5Xuf1L8fsB X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr1936262pgq.382.1533201498920; Thu, 02 Aug 2018 02:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533201498; cv=none; d=google.com; s=arc-20160816; b=Rw8m3iO5XtJzApUfRfRqConFRbatj4uDwuPXniM/0XiSxG8hfmIT+gLIixLNxmZnvM 2lbNgx2Jw0GdykAAN0S+H0xdghx37dlspQK5Es2vxL+hVx57ktq0BpSGDHoCuk5hZaJ8 rbndXvBTyYvtn7OO209S92D/9BCIqe48mZoYMZhb7caWQUPGm9bjnOyzb7DGRcSHQP+n QavuUFkCD8ouKdwVllDlNofpWAl76gFGmBzUfZen1goO9M8Kfd+O0uCvcuqvxbKqc0tO jTZTSVG9FowqQZJJMjTt0Az3SRANW3Z69/ysbUoShdctVCi4vkJrZi1bzZekktlhDPcg 8KWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=H7/kA2Jy3Y23wX8ImbQIzcz3Yd5mxaSbPaX8FMR/jF0=; b=elMX3qkJpFlApeOO3K+MOsiMExuBRrBRnlp9ixk6B9qaLPdoP21acx72QcgBNK+K57 t9Hu+SOvk897bbkbY8T2sFG/a1RkoaFNHKcixybdkZQT/f79a2HRKjiUH8GQAqG1dB9T wWC6ghTc4m9RIEBwxF6CqIO30uoDVu0vA2KydbJ88mr6Lf2ydWR43crbFBLX0Z3Z7KqK OXstPyik3olh36oOwUlGCHk3rJ1jrCgOAgkp3kOhDgt7P+cIrQ/TnNGTqIyUtlLtMgSG g1SLxfOsUq95Nm20A8jg9srmjfbvNplbtOaouQbgJftTlbyyvt5ngf6Y/Yxo420MF3k7 C+HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si1190893pge.572.2018.08.02.02.18.04; Thu, 02 Aug 2018 02:18:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731986AbeHBLGM (ORCPT + 99 others); Thu, 2 Aug 2018 07:06:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:52344 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726293AbeHBLGM (ORCPT ); Thu, 2 Aug 2018 07:06:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CF0B5AE20; Thu, 2 Aug 2018 09:15:55 +0000 (UTC) Date: Thu, 2 Aug 2018 11:15:54 +0200 From: Michal Hocko To: Jeremy Linton Cc: linux-mm@kvack.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, Punit.Agrawal@arm.com, Lorenzo.Pieralisi@arm.com, linux-arm-kernel@lists.infradead.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Subject: Re: [RFC 1/2] slub: Avoid trying to allocate memory on offline nodes Message-ID: <20180802091554.GE10808@dhcp22.suse.cz> References: <20180801200418.1325826-1-jeremy.linton@arm.com> <20180801200418.1325826-2-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801200418.1325826-2-jeremy.linton@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 01-08-18 15:04:17, Jeremy Linton wrote: [...] > @@ -2519,6 +2519,8 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, > if (unlikely(!node_match(page, searchnode))) { > stat(s, ALLOC_NODE_MISMATCH); > deactivate_slab(s, page, c->freelist, c); > + if (!node_online(searchnode)) > + node = NUMA_NO_NODE; > goto new_slab; This is inherently racy. Numa node can get offline at any point after you check it here. Making it race free would involve some sort of locking and I am not really convinced this is a good idea. > } > } > -- > 2.14.3 > -- Michal Hocko SUSE Labs