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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 37B7AC4360C for ; Fri, 4 Oct 2019 16:30:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 06BBE222C2 for ; Fri, 4 Oct 2019 16:30:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06BBE222C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9229B6B0003; Fri, 4 Oct 2019 12:30:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AAED6B0005; Fri, 4 Oct 2019 12:30:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 798296B000A; Fri, 4 Oct 2019 12:30:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 515CB6B0003 for ; Fri, 4 Oct 2019 12:30:47 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id AE006180AD804 for ; Fri, 4 Oct 2019 16:30:46 +0000 (UTC) X-FDA: 76006640892.23.men91_5e07e6748384f X-HE-Tag: men91_5e07e6748384f X-Filterd-Recvd-Size: 2477 Received: from Galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 16:30:46 +0000 (UTC) Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1iGQTa-0007bq-JS; Fri, 04 Oct 2019 18:30:42 +0200 Date: Fri, 4 Oct 2019 18:30:42 +0200 From: Sebastian Andrzej Siewior To: Uladzislau Rezki Cc: Daniel Wagner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Andrew Morton Subject: Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node Message-ID: <20191004163042.jpiau6dlxqylbpfh@linutronix.de> References: <20191003090906.1261-1-dwagner@suse.de> <20191004153728.c5xppuqwqcwecbe6@linutronix.de> <20191004162041.GA30806@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191004162041.GA30806@pc636> User-Agent: NeoMutt/20180716 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 2019-10-04 18:20:41 [+0200], Uladzislau Rezki wrote: > On Fri, Oct 04, 2019 at 05:37:28PM +0200, Sebastian Andrzej Siewior wrote: > > If you post something that is related to PREEMPT_RT please keep tglx and > > me in Cc. > > > > On 2019-10-03 11:09:06 [+0200], Daniel Wagner wrote: > > > Replace preempt_enable() and preempt_disable() with the vmap_area_lock > > > spin_lock instead. Calling spin_lock() with preempt disabled is > > > illegal for -rt. Furthermore, enabling preemption inside the > > > > Looking at it again, I have reasonable doubt that this > > preempt_disable() is needed. > > > The intention was to preload a current CPU with one extra object in > non-atomic context, thus to use GFP_KERNEL permissive parameters. I.e. > that allows us to avoid any allocation(if we stay on the same CPU) > when we are in atomic context do splitting. You could have been migrated to another CPU before the first preempt_disable(). You could have been migrated to another CPU while memory has been allocated. I don't really see the point of that preempt_disable() besides keeping debug code quiet. > If we have migrate_disable/enable, then, i think preempt_enable/disable > should be replaced by it and not the way how it has been proposed > in the patch. I don't think this patch is appropriate for upstream. Sebastian