Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5351003ybi; Tue, 30 Jul 2019 19:11:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeLN8EoJWgvnFJU0mzEXe/o+Ds+b6LsMi6fgsRE9nij+AkFdKWjkJnhPwKISayfceGtfCk X-Received: by 2002:a17:902:16f:: with SMTP id 102mr113749145plb.94.1564539074757; Tue, 30 Jul 2019 19:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564539074; cv=none; d=google.com; s=arc-20160816; b=ZIOKg3jhIZKntqjK/8lGCiX6U3T3cbKq/zTdNceF8Shw82G5KenGky1Cuq03xfVLGS Yxl5w7mSzFrAiqvzu6Y2e7823pa9uFJ2azXZWIpqa9DhubHm1z1QW7PB/xgqD84WMD7q ud4zfva+6d0tYrQHuy+HY4lpAZqB1YirtY6/elqLgbnz3gcxZvLH+O5RYJoh5rF1zxo2 PLC6YAP4yxvExowTvf1F3gxK/eC0kNVoRiMDEmgaN8NuGBDus2HiTodRtrzXYDHa1Idx Z0mBTidNJmkYf59Nnb9S65lWBti7JjGymWSQiTSO4+NXGQllO3O+vHcZsnGWlVgzsva2 ibHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to; bh=GhyoLKyG0uJOFlq1UGbCgWs1Ot1gFTXDuOPjy2wlxWk=; b=QyWRbN2P06bdsj/CTk4vRhbCoH9ssjppmD6YABPtSS643GGKgo1Ay11De85uWQsIZ6 LJm0iUQB0dyXmvnhM+TUxHMjEZ13u75roU/guN9HzXhxxBYNcsQ3LYCWJeXG8IrP+ibX 57ElIwt8y83qTYnmmDQzzefdTG9tDZDNnruQLofZEjm6weLAXZo7L9phK+vr+RkrgUIj QMpXj+XyLVdZEpmAiFF1GKSOS8UN4AEL/nrlJTJIpRdo0L1ThiFLdy7BRgqJ36y9fjDL 9HC9/VIWc1vYoVACxi8cR5IPLWZOjRE2CF/1MdJzyAnEEh6e8w04e4w7YVfuIHGMveZl FdMg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si29561616plf.305.2019.07.30.19.11.00; Tue, 30 Jul 2019 19:11:14 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387623AbfG3VP6 (ORCPT + 99 others); Tue, 30 Jul 2019 17:15:58 -0400 Received: from mga04.intel.com ([192.55.52.120]:19804 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387612AbfG3VP5 (ORCPT ); Tue, 30 Jul 2019 17:15:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2019 14:15:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,327,1559545200"; d="scan'208";a="196059110" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 30 Jul 2019 14:15:57 -0700 Received: from [10.54.74.33] (skuppusw-desk.jf.intel.com [10.54.74.33]) by linux.intel.com (Postfix) with ESMTP id DA4F65803A5; Tue, 30 Jul 2019 14:15:56 -0700 (PDT) Reply-To: sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v1 1/1] mm/vmalloc.c: Fix percpu free VM area search criteria To: Dave Hansen , Uladzislau Rezki Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20190729232139.91131-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20190730204643.tsxgc3n4adb63rlc@pc636> From: sathyanarayanan kuppuswamy Organization: Intel Message-ID: <9fdd44c2-a10e-23f0-a71c-bf8f3e6fc384@linux.intel.com> Date: Tue, 30 Jul 2019 14:13:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/19 1:54 PM, Dave Hansen wrote: > On 7/30/19 1:46 PM, Uladzislau Rezki wrote: >>> + /* >>> + * If required width exeeds current VA block, move >>> + * base downwards and then recheck. >>> + */ >>> + if (base + end > va->va_end) { >>> + base = pvm_determine_end_from_reverse(&va, align) - end; >>> + term_area = area; >>> + continue; >>> + } >>> + >>> /* >>> * If this VA does not fit, move base downwards and recheck. >>> */ >>> - if (base + start < va->va_start || base + end > va->va_end) { >>> + if (base + start < va->va_start) { >>> va = node_to_va(rb_prev(&va->rb_node)); >>> base = pvm_determine_end_from_reverse(&va, align) - end; >>> term_area = area; >>> -- >>> 2.21.0 >>> >> I guess it is NUMA related issue, i mean when we have several >> areas/sizes/offsets. Is that correct? > I don't think NUMA has anything to do with it. The vmalloc() area > itself doesn't have any NUMA properties I can think of. We don't, for > instance, partition it into per-node areas that I know of. > > I did encounter this issue on a system with ~100 logical CPUs, which is > a moderate amount these days. I agree with Dave. I don't think this issue is related to NUMA. The problem here is about the logic we use to find appropriate vm_area that satisfies the offset and size requirements of pcpu memory allocator. In my test case, I can reproduce this issue if we make request with offset (ffff000000) and size (600000). > -- Sathyanarayanan Kuppuswamy Linux kernel developer