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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 2BA62C47404 for ; Fri, 11 Oct 2019 21:56:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BBC92084C for ; Fri, 11 Oct 2019 21:56:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BBC92084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 04F808E0001; Fri, 11 Oct 2019 17:56:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 001666B0005; Fri, 11 Oct 2019 17:56:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E58118E0001; Fri, 11 Oct 2019 17:56:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id C498F6B0003 for ; Fri, 11 Oct 2019 17:56:47 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 644B068B7 for ; Fri, 11 Oct 2019 21:56:47 +0000 (UTC) X-FDA: 76032864054.13.cow08_103f26b80862 X-HE-Tag: cow08_103f26b80862 X-Filterd-Recvd-Size: 2779 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Oct 2019 21:56:46 +0000 (UTC) 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 493C4ACA8; Fri, 11 Oct 2019 21:56:44 +0000 (UTC) Subject: Re: [PATCH v2 1/1] mm/vmalloc: remove preempt_disable/enable when do preloading To: Sebastian Andrzej Siewior , "Uladzislau Rezki (Sony)" Cc: Andrew Morton , Thomas Gleixner , linux-mm@kvack.org, LKML , Peter Zijlstra , Hillf Danton , Michal Hocko , Matthew Wilcox , Oleksiy Avramchenko , Steven Rostedt References: <20191010223318.28115-1-urezki@gmail.com> <20191011181532.nardqmokz7yxtsu3@linutronix.de> From: Daniel Wagner Message-ID: Date: Fri, 11 Oct 2019 23:56:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191011181532.nardqmokz7yxtsu3@linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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 10/11/19 8:15 PM, Sebastian Andrzej Siewior wrote: > On 2019-10-11 00:33:18 [+0200], Uladzislau Rezki (Sony) wrote: >> Get rid of preempt_disable() and preempt_enable() when the >> preload is done for splitting purpose. The reason is that >> calling spin_lock() with disabled preemtion is forbidden in >> CONFIG_PREEMPT_RT kernel. >> >> Therefore, we do not guarantee that a CPU is preloaded, instead >> we minimize the case when it is not with this change. >> >> For example i run the special test case that follows the preload >> pattern and path. 20 "unbind" threads run it and each does >> 1000000 allocations. Only 3.5 times among 1000000 a CPU was >> not preloaded. So it can happen but the number is negligible. >> >> V1 -> V2: >> - move __this_cpu_cmpxchg check when spin_lock is taken, >> as proposed by Andrew Morton >> - add more explanation in regard of preloading >> - adjust and move some comments >> >> Fixes: 82dd23e84be3 ("mm/vmalloc.c: preload a CPU with one object for split purpose") >> Reviewed-by: Steven Rostedt (VMware) >> Signed-off-by: Uladzislau Rezki (Sony) > > Acked-by: Sebastian Andrzej Siewior Acked-by: Daniel Wagner