Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3846627pxj; Mon, 24 May 2021 16:44:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGx4Mk2omktQIKYOK1ghGI0CWJ99Wffooyo2lnQzeW/XGnUZHjBZ7TJ53jkTjaDqd8beY4 X-Received: by 2002:a50:9e2e:: with SMTP id z43mr24415178ede.70.1621899848477; Mon, 24 May 2021 16:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621899848; cv=none; d=google.com; s=arc-20160816; b=O9JbGhSa2lgAov+XMzN3E17OeOyvnPMQEJFIn8+D14tVcjo7YUgka4Ez+/8hnUMA8e lJorZZ/HwV74/LJpVwlNZv+Z9sDsFuhBkTVTYZiF8VP/6sKepuLyZWXmtxgtETBroBth oRs3dCD2IU3l7lhJsH+T+EfwmZEyHvL2vKMk5QmsvtBGBNqEXaDzYZjFGD+1H0YgA10b cUnOAUXf5NRa31tjhYiuxygkJaGKd/bJFxzOsJ5tKEqnDtZuzLldDQvTD14jtl7fWI5a CfMLo2vIMy8O3ZW9JhuceFvKlalCb5hqYmLHNdhDsPZlgKwwR3PctuOIgVWTgXnaAFC6 gjSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=J5QSAKwogWxiihbFPOl0HVlMof8QL2JF10nKieb0JlE=; b=yee7aD5sgQ4DI7yu9LiAQNpYqY690D+QreNSTpE1N0kduf77J/6h3h5HfNL8yCjt0y Iyf3Lji/YiuX547KRWcFqUy4fsOsngu8X125fvlrX0jbikAqmyxz+0Jb1H9mukOYry8U Ly/zf9EhmbGuqZRnAbgFnWlBeZeUJtCINqjn9hwq+YHgW1abucGZkKsdAmK9uhYPEkX4 gzkbQM6JASU1j+nzsqQLnWeiyets8hkiP5P26rUczO/OF9ugD78zUmawv5F4Fe8XZuH4 N0R3d6gNwlQBcL6ngv4VsmrMr7kG371LQBCeHjAtjQIPHVAh3pQliEvnH5oM5G1A0tKi fHMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=mYMOGIMk; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fl21si14183745ejc.601.2021.05.24.16.43.46; Mon, 24 May 2021 16:44:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=mYMOGIMk; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbhEXXnb (ORCPT + 99 others); Mon, 24 May 2021 19:43:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:50702 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbhEXXmV (ORCPT ); Mon, 24 May 2021 19:42:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1621899650; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J5QSAKwogWxiihbFPOl0HVlMof8QL2JF10nKieb0JlE=; b=mYMOGIMkYBZS2dqEnwu7v4VwPr8L5qdfFRH1Au4jNyg5hhYxkozBUQVtmLuBXMILltE7SS 0xov9E2ugEBQWIfl0/yh7ypvMIiLAjLlw1Y7DVl3VlqUh89jjVMlVlUZc+qABkuaKIDy6V kL4YdysgJAQ4umo8VioOpFwisLYnqBg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1621899650; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J5QSAKwogWxiihbFPOl0HVlMof8QL2JF10nKieb0JlE=; b=RvHe4x13YTAy3y2hzKOWFdxfidOnlP0m+M7I/MHXjxm8KmLql1wtJs0OuAhgT3/Ry3bVhx qXI8N+bOg9fJOxAA== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E51D6AF59; Mon, 24 May 2021 23:40:49 +0000 (UTC) From: Vlastimil Babka To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn , Vlastimil Babka Subject: [RFC 25/26] mm, slub: use migrate_disable() in put_cpu_partial() Date: Tue, 25 May 2021 01:39:45 +0200 Message-Id: <20210524233946.20352-26-vbabka@suse.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524233946.20352-1-vbabka@suse.cz> References: <20210524233946.20352-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In put_cpu_partial, we need a stable cpu, but being preempted is not an issue. So, disable migration instead of preemption. Signed-off-by: Vlastimil Babka --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index bfa5e7c4da1b..8818c210cb97 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2417,7 +2417,7 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) int pages; int pobjects; - preempt_disable(); + migrate_disable(); do { pages = 0; pobjects = 0; @@ -2451,7 +2451,7 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) if (unlikely(!slub_cpu_partial(s))) unfreeze_partials(s); - preempt_enable(); + migrate_enable(); #endif /* CONFIG_SLUB_CPU_PARTIAL */ } -- 2.31.1