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 CA872C433EF for ; Thu, 13 Jan 2022 15:50:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 345716B0072; Thu, 13 Jan 2022 10:50:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F41F6B0073; Thu, 13 Jan 2022 10:50:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 195466B0074; Thu, 13 Jan 2022 10:50:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 0A4FF6B0072 for ; Thu, 13 Jan 2022 10:50:43 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A44EE181C9D47 for ; Thu, 13 Jan 2022 15:50:42 +0000 (UTC) X-FDA: 79025701524.27.9D9C6B0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 2BB52C0004 for ; Thu, 13 Jan 2022 15:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642089041; 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=0RQ3puUcYuHO/5UfsU4Xhhp2Gu/t2oxOAbK9fU144eE=; b=RwcpVaOQpoP3+Jj5f1l3w6B8jXiSIQ40wz45tKZzM54sRhUJyTkeYAENGk7VoN7J0yQnwq Rf7o4qiSSmFyQd2XwCKgivDua/xvusrPRcoYdu2yFKgYHuZSMsx7vyKYWlBUWmi2Pp7qax GejVf5xk6yZ70cHIDzqdmSENEPQ84e0= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-441-JzETEcjMN7WEvdMNXHeoDw-1; Thu, 13 Jan 2022 10:50:40 -0500 X-MC-Unique: JzETEcjMN7WEvdMNXHeoDw-1 Received: by mail-ed1-f70.google.com with SMTP id l14-20020aa7cace000000b003f7f8e1cbbdso5689785edt.20 for ; Thu, 13 Jan 2022 07:50:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=0RQ3puUcYuHO/5UfsU4Xhhp2Gu/t2oxOAbK9fU144eE=; b=RoYL2i4FsDlXVH15E9xzQZmvxD3l5R02EvNEV88XsE3+Xx93YKr0rNdfuSZ70WZTsu p0/roEglIjkQIkSTqvb7RNXHv0Ylofi5RpsvCvOe/iCc5ZJ0+u/g26F3bPHI/jvafepC MZDQyvnn7aU5Mah/0hs042Lmpj+VY0gkUbFh8uh29P1Z0kDwq1DprW6f7LoVm4I3Tmh2 lCvJieLTBg7+K6j/s04dKfmDLo67OJItGWCe2MpxiTl6i9WrbE0px8e/mW3xEaM//jvM Jfjh0mgfFFI39qQmyb8mPI88daxbwtc9PXrkmXEAeQj97xkq56xmeEVbAKozwBUAhZa0 I9ew== X-Gm-Message-State: AOAM532sE+bmjgBW7Hk3hNk9mLR60eogvtMlYnYmCvWDOfI8pZQb2Gpo oQb6QFiQ8EdK9XoTTUwiCgWALxG4tnNWppu95djMQDfH9F/kd92DDVRHeMDb2Thoo7mJY/al7Yy ZHWdC9q/45+s= X-Received: by 2002:a05:6402:3588:: with SMTP id y8mr4824687edc.147.1642089039285; Thu, 13 Jan 2022 07:50:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNFlqW+90z8MqJGfmQJtPI4aVOG3CgxuC8pcaaa86GGnEzwNl0A4gvDtrNM26vya8mfn/rVA== X-Received: by 2002:a05:6402:3588:: with SMTP id y8mr4824671edc.147.1642089039121; Thu, 13 Jan 2022 07:50:39 -0800 (PST) Received: from ?IPV6:2003:cb:c703:e200:8511:ed0f:ac2c:42f7? (p200300cbc703e2008511ed0fac2c42f7.dip0.t-ipconnect.de. [2003:cb:c703:e200:8511:ed0f:ac2c:42f7]) by smtp.gmail.com with ESMTPSA id qw4sm1026745ejc.55.2022.01.13.07.50.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jan 2022 07:50:38 -0800 (PST) Message-ID: <5da2e9ae-24bc-a146-053d-a43063bad73e@redhat.com> Date: Thu, 13 Jan 2022 16:50:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [RFC PATCH v3 3/8] mm: migrate: allocate the right size of non hugetlb or THP compound pages. To: Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michael Ellerman , Christoph Hellwig , Marek Szyprowski , Robin Murphy , linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, Vlastimil Babka , Mel Gorman , Eric Ren References: <20220105214756.91065-1-zi.yan@sent.com> <20220105214756.91065-4-zi.yan@sent.com> <970ca2a4-416d-7e8f-37c7-510c5b050f4b@redhat.com> <15E26B9B-8AE2-4916-94E7-D0BBB2491B1B@nvidia.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <15E26B9B-8AE2-4916-94E7-D0BBB2491B1B@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 2BB52C0004 X-Stat-Signature: w84pe8o5xrg9c7gjijczx8b1csxhginz Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=RwcpVaOQ; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf22.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-HE-Tag: 1642089042-198298 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 13.01.22 16:46, Zi Yan wrote: > On 12 Jan 2022, at 6:04, David Hildenbrand wrote: > >> On 05.01.22 22:47, Zi Yan wrote: >>> From: Zi Yan >>> >>> alloc_migration_target() is used by alloc_contig_range() and non-LRU >>> movable compound pages can be migrated. Current code does not allocate the >>> right page size for such pages. Check THP precisely using >>> is_transparent_huge() and add allocation support for non-LRU compound >>> pages. >> >> IIRC, we don't have any non-lru migratable pages that are coumpound >> pages. Read: not used and not supported :) > > OK, but nothing prevents one writing a driver that allocates compound > pages and provides address_space->migratepage() and address_space->isolate_page(). > > Actually, to test this series, I write a kernel module that allocates > an order-10 page, gives it a fake address_space with migratepage() and > isolate_page(), __SetPageMovable() on it, then call alloc_contig_range() > on the page range. Apparently, my kernel module is not supported by > the kernel, thus, I added this patch. > > Do you have an alternative test to my kernel module, so that I do not > even need this patch myself? > >> Why is this required in the context of this series? > > It might not be required. I will drop it. That's why I think it would be best dropping it. If you need it in different context, better submit it in different context. Makes this series easier to digest :) -- Thanks, David / dhildenb