Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1469483pxy; Thu, 6 May 2021 08:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzk+EoiCWMBWS0WD4+MuF97k4JPEn4gZ0XVytruneA7NEfyYCE+Z9nrBEy11AlEnBtiqkW X-Received: by 2002:aa7:83c3:0:b029:28e:92e6:46b5 with SMTP id j3-20020aa783c30000b029028e92e646b5mr5445355pfn.43.1620315291328; Thu, 06 May 2021 08:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620315291; cv=none; d=google.com; s=arc-20160816; b=Db13THubApkuHZuvp7H99yWvmG6OI0PBjDaotKc2+ppoqXhWshDwJpX92ux5Dj+xTB 0nUFwjOg6gJO8oBAF13pjsCcFexYHHNhZaJ1P2EvLUsyv/RoZRzoM41YBl9zaf+YA55H dn3rtCFZUj3bXsJMmobaZspwARJuX0KysC4d9oj7xEcWko/1TeQAE8uhIMqEpGqOegGi msR7UpwVNHAhMI+GuHJa3A6KY3U9aLJevHbMH/Q3z0w9KVntU/ek6Q6XUEzBMbi1ZGaD Cr80FIykb0iiNCs1OKWsjHNj7FyigeLub7tgtgqkswVlvD7UKKk9zbiAhkaawAPcxwVw MOnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=M3gJNK8hV6eVduRJTKvIL/+ipOjUBkl33BLAv9gMTmY=; b=HhH+1dfPzDjvrf+zkkiG+/5yA6UUXMHg/3FuJAECJ26KN8wmAJA9/f78IXfqRHfc3V bXYgbinFjI+gcPCbVRKBqyg+TUI3WYDphBviYJRWwlthFJqAkR8TD3KhiJdE5fXlp+VR 1fIsPnJ4xtGuDgrU8SeSmWHAUDIbae2hxxKxdZz+DkgxhyksYJH3Vv3E9awBA4HR3bfD 1LEHMbcqAgLDLQ/7UUgNCqJUTCPWW94/s3gHbe5RODI79G9ZFjQywpIWZcm/miNn9PX8 G3+Si4IrCXznIsy8IiGoFev4e1jk5ruBvMoGNCneBDsT5xD/M/dgetR96wKARj5rrNvS xCWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VLHTiybD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si2079662plz.267.2021.05.06.08.34.31; Thu, 06 May 2021 08:34:51 -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=@redhat.com header.s=mimecast20190719 header.b=VLHTiybD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235246AbhEFPcP (ORCPT + 99 others); Thu, 6 May 2021 11:32:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48081 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235147AbhEFPcN (ORCPT ); Thu, 6 May 2021 11:32:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620315073; 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=M3gJNK8hV6eVduRJTKvIL/+ipOjUBkl33BLAv9gMTmY=; b=VLHTiybD1m6GB1ZwNWwTjlJ0oyYkKuiMxUjGE40ttfEGckY5/TWunHEBi9o8B9wcXWbcgh 9R2HRTDK+PDgrxJqC3L4SFMmhVzremInl+e95g6a8lVjNZOkQEZeRKx8UjWFZwqMMtzXE8 sLtEISrzVNLaH7YBS+57yiz8yjiR8Bg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-mYIlnC2iNKiIlslx9l1VgQ-1; Thu, 06 May 2021 11:31:12 -0400 X-MC-Unique: mYIlnC2iNKiIlslx9l1VgQ-1 Received: by mail-wm1-f72.google.com with SMTP id t7-20020a1cc3070000b029014131bbe82eso2794866wmf.3 for ; Thu, 06 May 2021 08:31:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=M3gJNK8hV6eVduRJTKvIL/+ipOjUBkl33BLAv9gMTmY=; b=Pd9GERnCLmNAfR6iDVCT7HLcFQkEd9epO/As/vOojMK9WczODI+Pj6+YySpBY2+aLT gaZPbtVx02aV0wMlqMt27FaFow3Vz/vLsJaTH0yNeBorqkBgVA0/bqZtRikRAmKfBV/d nhWEoEJNGdBuep0cTdETh8RTg6haXOgab5y3czgvmjf9/fpxP65mTl5QiMiKagxLyeay TFif+PGx/wk2UsZcxSLrCIirlpDMLXnxsjkLemEsgOOM2rWaIyPNSXUVmjKBlPlfSSJk G8ePH/IUcf43rokL4yQvaBpu2+Qq/stmNet6WaFbdDwItSbQUuBH14QyWDctNhGUAbFD jFOw== X-Gm-Message-State: AOAM53273nQmcgy8y36cGhXF1NCoqrG8Zr7zoxzWuvtgws7uWGa9fll/ iupJhdlAKcg+hGn1GPRokkvwgua/YLy9mPHrcatJL94RD3AioZ92l6m3UnzHb0GArOTw/RnrQby p8zZL8kXbQsQXTy77BrbWBtSr X-Received: by 2002:a05:600c:4982:: with SMTP id h2mr4597225wmp.108.1620315071105; Thu, 06 May 2021 08:31:11 -0700 (PDT) X-Received: by 2002:a05:600c:4982:: with SMTP id h2mr4597190wmp.108.1620315070857; Thu, 06 May 2021 08:31:10 -0700 (PDT) Received: from [192.168.3.132] (p5b0c64ae.dip0.t-ipconnect.de. [91.12.100.174]) by smtp.gmail.com with ESMTPSA id q12sm9157467wmj.7.2021.05.06.08.31.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 May 2021 08:31:10 -0700 (PDT) Subject: Re: [RFC PATCH 0/7] Memory hotplug/hotremove at subsection size To: Zi Yan , Oscar Salvador Cc: Michael Ellerman , Benjamin Herrenschmidt , Thomas Gleixner , x86@kernel.org, Andy Lutomirski , "Rafael J . Wysocki" , Andrew Morton , Mike Rapoport , Anshuman Khandual , Michal Hocko , Dan Williams , Wei Yang , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org References: <20210506152623.178731-1-zi.yan@sent.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Thu, 6 May 2021 17:31:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210506152623.178731-1-zi.yan@sent.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.05.21 17:26, Zi Yan wrote: > From: Zi Yan > > Hi all, > > This patchset tries to remove the restriction on memory hotplug/hotremove > granularity, which is always greater or equal to memory section size[1]. > With the patchset, kernel is able to online/offline memory at a size independent > of memory section size, as small as 2MB (the subsection size). ... which doesn't make any sense as we can only online/offline whole memory block devices. > > The motivation is to increase MAX_ORDER of the buddy allocator and pageblock > size without increasing memory hotplug/hotremove granularity at the same time, Gah, no. Please no. No. > so that the kernel can allocator 1GB pages using buddy allocator and utilizes > existing pageblock based anti-fragmentation, paving the road for 1GB THP > support[2]. Not like this, please no. > > The patchset utilizes the existing subsection support[3] and changes the > section size alignment checks to subsection size alignment checks. There are > also changes to pageblock code to support partial pageblocks, when pageblock > size is increased along with MAX_ORDER. Increasing pageblock size can enable > kernel to utilize existing anti-fragmentation mechanism for gigantic page > allocations. Please not like this. > > The last patch increases SECTION_SIZE_BITS to demonstrate the use of memory > hotplug/hotremove subsection, but is not intended to be merged as is. It is > there in case one wants to try this out and will be removed during the final > submission. > > Feel free to give suggestions and comments. I am looking forward to your > feedback. Please not like this. -- Thanks, David / dhildenb