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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 533B5ECAAA1 for ; Fri, 9 Sep 2022 21:16:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A0C938D0003; Fri, 9 Sep 2022 17:16:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9BC148D0002; Fri, 9 Sep 2022 17:16:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85E968D0003; Fri, 9 Sep 2022 17:16:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 72B0C8D0002 for ; Fri, 9 Sep 2022 17:16:53 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 47D8D1C62EA for ; Fri, 9 Sep 2022 21:16:53 +0000 (UTC) X-FDA: 79893806706.03.44D6DBC Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf10.hostedemail.com (Postfix) with ESMTP id C27EBC0072 for ; Fri, 9 Sep 2022 21:16:52 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 81D471F8DA; Fri, 9 Sep 2022 21:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1662758211; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WIv6YUOZ4IobLDob7fseZQlh5wCZ0wisJ742CqXLiGc=; b=yKKe5ubPVj2STvDYkh282N7R+zNQY5og3WQoxDTswcuO8Xvak3L15SeToVnzE0IV5g44nT X8L4jCvdhg7TydhLZ30fDSnriOgaPylEXqNtqYL8k9kmAWOQXvgMt/1DJ5L0hSLb0O16rs sEHqv8E5oHzsRsjSQzadU/VnCLMGvAQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1662758211; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WIv6YUOZ4IobLDob7fseZQlh5wCZ0wisJ742CqXLiGc=; b=75MiA48VW/YbFqNU6ixMphcd9uWz7E9yc2Gd5ZxrPBC+c5uaeA0C3WwshJN0oITy4abUQX F/+eMHr68KZ/gXBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5742B13A93; Fri, 9 Sep 2022 21:16:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LYacFEOtG2P3VgAAMHmgww (envelope-from ); Fri, 09 Sep 2022 21:16:51 +0000 Message-ID: Date: Fri, 9 Sep 2022 23:16:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [mm/sl[au]b] 3c4cafa313: canonical_address#:#[##] Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: kernel test robot , lkp@lists.01.org, lkp@intel.com, Joel Fernandes , linux-mm@kvack.org, rcu@vger.kernel.org, paulmck@kernel.org, Alexey Dobriyan , Matthew Wilcox References: <20220906074548.GA72649@inn2.lkp.intel.com> <208c1757-5edd-fd42-67d4-1940cc43b50f@intel.com> <416149c0-1e18-0e00-d116-dd3738957556@suse.cz> <3d178109-5981-f4ee-8fe5-4f1d0c557ed2@suse.cz> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662758213; a=rsa-sha256; cv=none; b=LQekKqEuNoAkUAKfDD+t2TFVnQ6jcDhkALduGziKp3vOt1aYVmKNnvx7wHbZ/el71T3flS 8g5BskD0aGd610KAOkQGuOHw/vczbVXzDMCwKLYL40HY0a8LTwJvD8eKQ/DPbiJ/o1lWeE QQHvGeQONOtG8ikgy4uFGS+QoJtJVyM= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=yKKe5ubP; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=75MiA48V; dmarc=none; spf=pass (imf10.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662758213; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WIv6YUOZ4IobLDob7fseZQlh5wCZ0wisJ742CqXLiGc=; b=0XpZ49Au5IIMA3xJxRbwCMMV/myxpB3DTW5i5O0jaC28b5TpIMhtCWnryGe1QtU59QSs+T RVh7rdFKcVa5hBjWmyUcUKCma+KtaZNbWH9zWirzfjvcuHF1awGkb/tPTFQwRuXPGLY40Z ukezcHDirgscw/kSx13cNFKJXNd6uK4= Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=yKKe5ubP; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=75MiA48V; dmarc=none; spf=pass (imf10.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspam-User: X-Rspamd-Server: rspam10 X-Stat-Signature: 9sk8fj583e4ajuzd9x3gwzgbgwx83bo1 X-Rspamd-Queue-Id: C27EBC0072 X-HE-Tag: 1662758212-677913 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 9/9/22 16:32, Hyeonggon Yoo wrote: > On Fri, Sep 09, 2022 at 03:44:19PM +0200, Vlastimil Babka wrote: >> On 9/9/22 13:05, Hyeonggon Yoo wrote: >> >> ----8<---- >> >> From d6f9fbb33b908eb8162cc1f6ce7f7c970d0f285f Mon Sep 17 00:00:00 2001 >> >> From: Vlastimil Babka >> >> Date: Fri, 9 Sep 2022 12:03:10 +0200 >> >> Subject: [PATCH 2/3] mm/migrate: make isolate_movable_page() skip slab pages >> >> >> >> In the next commit we want to rearrange struct slab fields to allow a >> >> larger rcu_head. Afterwards, the page->mapping field will overlap >> >> with SLUB's "struct list_head slab_list", where the value of prev >> >> pointer can become LIST_POISON2, which is 0x122 + POISON_POINTER_DELTA. >> >> Unfortunately the bit 1 being set can confuse PageMovable() to be a >> >> false positive and cause a GPF as reported by lkp [1]. >> >> >> >> To fix this, make isolate_movable_page() skip pages with the PageSlab >> >> flag set. This is a bit tricky as we need to add memory barriers to SLAB >> >> and SLUB's page allocation and freeing, and their counterparts to >> >> isolate_movable_page(). >> > >> > Hello, I just took a quick grasp, >> > Is this approach okay with folio_test_anon()? >> >> Not if used on a completely random page as compaction scanners can, but >> relies on those being first tested for PageLRU or coming from a page table >> lookup etc. >> Not ideal huh. Well I could improve also by switching 'next' and 'slabs' >> field and relying on the fact that the value of LIST_POISON2 doesn't include >> 0x1, just 0x2. > > What about swapping counters and freelist? > freelist should be always aligned. Great suggestion, thanks! Had to deal with SLAB too as there was list_head.prev also aliasing page->mapping. Wanted to use freelist as well, but turns out it's not aligned, so had to use s_mem instead. The patch that isolate_movable_page() skip slab pages was thus dropped. The result is in slab.git below and if nothing blows up, will restore it to -next https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/log/?h=for-6.1/fit_rcu_head