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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA003C636CC for ; Wed, 8 Feb 2023 10:14:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbjBHKOz (ORCPT ); Wed, 8 Feb 2023 05:14:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbjBHKOo (ORCPT ); Wed, 8 Feb 2023 05:14:44 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1424345A for ; Wed, 8 Feb 2023 02:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675851243; h=from:from: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; bh=ME71NVvKp2x1te3CcnQMIWa4oEmZB0HEW3AvhOptsO8=; b=cJPZlfHqAUmuGCDdx3tggnEv0hVw/LZUKDv22x/t8mzvu9Cnn+Bj2srOZiNLYywr1HG45o pAINPdqQVzoo8A+vzvVequA1VZ0hAUKRcjtOF1+RMqMytdE+5SnA/R0TJtglESMoevK2tt i1kR43gxOuDD2GM/Wh1J794mb+fvKyk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-4Aty7J8JNMyX4QjyeYKvMg-1; Wed, 08 Feb 2023 05:14:01 -0500 X-MC-Unique: 4Aty7J8JNMyX4QjyeYKvMg-1 Received: by mail-wr1-f70.google.com with SMTP id w10-20020a5d544a000000b002c3de7a10b0so1772013wrv.5 for ; Wed, 08 Feb 2023 02:14:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ME71NVvKp2x1te3CcnQMIWa4oEmZB0HEW3AvhOptsO8=; b=y1jgzXdl1d5msnEtvYYhYGHAVxoC2FRYNqmUA77WaBSaDMhhhBWLy0c5u2CvEyYNCF vK2Xebnj69dSnE1OxIFvzkCm/t0VXm3CANbJSusNb8wlujJwQmM2NKxGxpDOl7hJZwvY of8Pl2uvaSB2piYh3pVZHkPX3MyFRAEzo6UDlNEOLiZ3sCIoJWBlLtT1TNAB50NNl7S3 qssceJhjr+TzWSonhxj4DGAnXpy6oIda6L5qRIh8iZjKXcnBNRCjNKrAJc9EurQzq36J seUi0pW9fiBOjih2qYFjFvF8sRiqgSMjhcfjyVyPlAiNoqq3vJDKMI/aWzomBX/FSGrF sVHg== X-Gm-Message-State: AO0yUKWn6jpAAFbaWEutOu13p3bmVuC+jayYUkKhUqNm00oz4JOyOB9v 4Dr3X0yckjiiwdumSgfkR59D5U3hjyRm3Alc/+OBQbCchdvWG00BuZ7Q2m0DkbQkXdYHlFi2rmW NTVrbLiBpWRQSSNd0gLS05rMY X-Received: by 2002:a05:600c:1688:b0:3dd:caa8:3ae2 with SMTP id k8-20020a05600c168800b003ddcaa83ae2mr6131970wmn.6.1675851239764; Wed, 08 Feb 2023 02:13:59 -0800 (PST) X-Google-Smtp-Source: AK7set8tVMja9BGeK7SFvSxfu2oOsWjpNFKTJBKL/QbzxmRe7J182tCeCQFsWiVPrkEbqzyq9yjqpg== X-Received: by 2002:a05:600c:1688:b0:3dd:caa8:3ae2 with SMTP id k8-20020a05600c168800b003ddcaa83ae2mr6131946wmn.6.1675851239477; Wed, 08 Feb 2023 02:13:59 -0800 (PST) Received: from ?IPV6:2003:cb:c704:b300:758c:6214:cd51:8ab0? (p200300cbc704b300758c6214cd518ab0.dip0.t-ipconnect.de. [2003:cb:c704:b300:758c:6214:cd51:8ab0]) by smtp.gmail.com with ESMTPSA id e1-20020a05600c4e4100b003dc49e0132asm1535063wmq.1.2023.02.08.02.13.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Feb 2023 02:13:58 -0800 (PST) Message-ID: Date: Wed, 8 Feb 2023 11:13:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [RFC v3 2/4] mm: move PG_slab flag to page_type To: Mike Rapoport Cc: Matthew Wilcox , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Vlastimil Babka , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Joe Perches , Petr Mladek , Andy Shevchenko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Alexander Potapenko , Marco Elver References: <20221218101901.373450-1-42.hyeyoo@gmail.com> <20221218101901.373450-3-42.hyeyoo@gmail.com> <15fda061-72d9-2ee9-0e9f-6f0f732a7382@suse.cz> <59630801-42b4-22e8-0ef6-5a5b8636dfbd@redhat.com> Content-Language: en-US From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.02.23 10:44, Mike Rapoport wrote: > On Fri, Feb 03, 2023 at 05:04:01PM +0100, David Hildenbrand wrote: >> On 30.01.23 06:11, Matthew Wilcox wrote: >>> On Mon, Jan 30, 2023 at 01:34:59PM +0900, Hyeonggon Yoo wrote: >>>>> Seems like quite some changes to page_type to accomodate SLAB, which is >>>>> hopefully going away soon(TM). Could we perhaps avoid that? >>>> >>>> If it could be done with less changes, I'll try to avoid that. >>> >>> Let me outline the idea I had for removing PG_slab: >>> >>> Observe that PG_reserved and PG_slab are mutually exclusive. Also, >> >> I recall that there are SetPageReserved() calls on pages allocated via slab. > > I did a quick scan, and it seems that all allocated reserved pages come > from alloc_pages() or vmalloc(). > Thanks for checking, good that my memory was wrong :) > BTW, looking at the current usage of SetPageReserved, it seems that some > are bogus/historical and some would justify a different page type if we are > to have 15 bits for PG_kernel. I remember raising in the past that something like PG_hole might be helpful. I also recall that most SetPageReserved usage in drivers is to make ioremap happy. PG_ioremappable or smth like that would be better. So yes, that would even help to cleanup the existing PG_reserved usage. -- Thanks, David / dhildenb