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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 87B69ECE58D for ; Fri, 11 Oct 2019 23:55:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4796E2190F for ; Fri, 11 Oct 2019 23:55:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q130Eda4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4796E2190F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DDB1C6B0003; Fri, 11 Oct 2019 19:55:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D64926B0005; Fri, 11 Oct 2019 19:55:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C78EB8E0001; Fri, 11 Oct 2019 19:55:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 9FECA6B0003 for ; Fri, 11 Oct 2019 19:55:18 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 20A1B180AD80A for ; Fri, 11 Oct 2019 23:55:18 +0000 (UTC) X-FDA: 76033162716.14.brake97_11223edb6cf4d X-HE-Tag: brake97_11223edb6cf4d X-Filterd-Recvd-Size: 3308 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Oct 2019 23:55:17 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C9AE20663; Fri, 11 Oct 2019 23:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570838116; bh=ax686pJ3fwHRXkYEzK6rzHdFbX01bbXaYBqGuLR8qoE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Q130Eda4QY0u77zTziwgXggx4QQabTxsxD1bLStU6hTCH9RiuYcm4dKl4nIc3WKN2 ZDmR6bi2g7yyzAvMxLIp/6K0wEwJc9eryUGVULED0vgVOWvujZA0ynEzuaCs2aBJnh hrIuoeLj3R53M5a20RgR+sax6KuifGzKzsTbgoTA= Date: Fri, 11 Oct 2019 16:55:15 -0700 From: Andrew Morton To: Uladzislau Rezki Cc: Steven Rostedt , Daniel Wagner , Sebastian Andrzej Siewior , Thomas Gleixner , linux-mm@kvack.org, LKML , Peter Zijlstra , Hillf Danton , Michal Hocko , Matthew Wilcox , Oleksiy Avramchenko Subject: Re: [PATCH 1/1] mm/vmalloc: remove preempt_disable/enable when do preloading Message-Id: <20191011165515.a25e7d1c22e6b5e3e6fb69da@linux-foundation.org> In-Reply-To: <20191010151749.GA14740@pc636> References: <20191009164934.10166-1-urezki@gmail.com> <20191009151901.1be5f7211db291e4bd2da8ca@linux-foundation.org> <20191009221725.0b83151e@oasis.local.home> <20191010151749.GA14740@pc636> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Thu, 10 Oct 2019 17:17:49 +0200 Uladzislau Rezki wrote: > > > : * The preload is done in non-atomic context, thus it allows us > > > : * to use more permissive allocation masks to be more stable under > > > : * low memory condition and high memory pressure. > > > : * > > > : * Even if it fails we do not really care about that. Just proceed > > > : * as it is. "overflow" path will refill the cache we allocate from. > > > : */ > > > : if (!this_cpu_read(ne_fit_preload_node)) { > > > > > > Readability nit: local `pva' should be defined here, rather than having > > > function-wide scope. > > > > > > : pva = kmem_cache_alloc_node(vmap_area_cachep, GFP_KERNEL, node); > > > > > > Why doesn't this honour gfp_mask? If it's not a bug, please add > > > comment explaining this. > > > > But there is a comment, if understand you correctly: > > > * Even if it fails we do not really care about that. Just proceed > * as it is. "overflow" path will refill the cache we allocate from. > My point is that the alloc_vmap_area() caller passed us a gfp_t but this code ignores it, as does adjust_va_to_fit_type(). These *look* like potential bugs. If not, they should be commented so they don't look like bugs any more ;)