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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BF3AC64E7C for ; Wed, 2 Dec 2020 20:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A57B21527 for ; Wed, 2 Dec 2020 20:36:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbgLBUgg (ORCPT ); Wed, 2 Dec 2020 15:36:36 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:25158 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726162AbgLBUgf (ORCPT ); Wed, 2 Dec 2020 15:36:35 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B2KY1DP048621; Wed, 2 Dec 2020 15:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=AROrU5uf8FK5x25WkTE5ro/clfKSdtvAsxWSgMb/DW0=; b=rf4IyNHjmfnEiS2+lIiNIdBQqHl5jL7DT9zBRVckrF/rF4FB0uHEkbWDZd5YsiR96Dd7 EXXfwoYnvjFGsCrWK0JtkqS/QFgnsV9JX5qibBvjXB3YKQoAA6X4kGBQFKeS7TQC/31l P6XywBDf+wFWDt3W55N4mqKJV7+7OsK81XO3AtTutTXIqIrmb58FuoFAhn8Ht1kX9GHd L5nlbLO8k51y9UHheELtlgjY1X88/SIOsnjIAI4qXjDYqgt9ClulzTSDythmSYdIsw+8 H350sfvep7tgBtYiNyN0PJ80N+Rc90br0Wr5ZtaI5OYx/oH9TtD1CWWlrZZ+WEbsgaln 9A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 356dgfr1mb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 15:35:47 -0500 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0B2KY8VG049170; Wed, 2 Dec 2020 15:35:46 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 356dgfr1kf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 15:35:46 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B2KRwv9032470; Wed, 2 Dec 2020 20:35:44 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma05fra.de.ibm.com with ESMTP id 353e68acha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 20:35:44 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B2KZg9H27197908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 20:35:42 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46254A4040; Wed, 2 Dec 2020 20:35:42 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5A2DA4057; Wed, 2 Dec 2020 20:35:41 +0000 (GMT) Received: from osiris (unknown [9.171.12.240]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 2 Dec 2020 20:35:41 +0000 (GMT) Date: Wed, 2 Dec 2020 21:35:40 +0100 From: Heiko Carstens To: Anshuman Khandual Cc: linux-mm@kvack.org, akpm@linux-foundation.org, david@redhat.com, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Gorbik , Catalin Marinas , Will Deacon , Ard Biesheuvel , Mark Rutland Subject: Re: [RFC V2 0/3] mm/hotplug: Pre-validate the address range with platform Message-ID: <20201202203540.GC11274@osiris> References: <1606706992-26656-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1606706992-26656-1-git-send-email-anshuman.khandual@arm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-12-02_12:2020-11-30,2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 mlxlogscore=792 lowpriorityscore=0 adultscore=0 phishscore=0 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012020119 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 08:59:49AM +0530, Anshuman Khandual wrote: > This series adds a mechanism allowing platforms to weigh in and prevalidate > incoming address range before proceeding further with the memory hotplug. > This helps prevent potential platform errors for the given address range, > down the hotplug call chain, which inevitably fails the hotplug itself. > > This mechanism was suggested by David Hildenbrand during another discussion > with respect to a memory hotplug fix on arm64 platform. > > https://lore.kernel.org/linux-arm-kernel/1600332402-30123-1-git-send-email-anshuman.khandual@arm.com/ > > This mechanism focuses on the addressibility aspect and not [sub] section > alignment aspect. Hence check_hotplug_memory_range() and check_pfn_span() > have been left unchanged. Wondering if all these can still be unified in > an expanded memhp_range_allowed() check, that can be called from multiple > memory hot add and remove paths. > > This series applies on v5.10-rc6 and has been slightly tested on arm64. > But looking for some early feedback here. > > Changes in RFC V2: > > Incorporated all review feedbacks from David. > > - Added additional range check in __segment_load() on s390 which was lost > - Changed is_private init in pagemap_range() > - Moved the framework into mm/memory_hotplug.c > - Made arch_get_addressable_range() a __weak function > - Renamed arch_get_addressable_range() as arch_get_mappable_range() > - Callback arch_get_mappable_range() only handles range requiring linear mapping > - Merged multiple memhp_range_allowed() checks in register_memory_resource() > - Replaced WARN() with pr_warn() in memhp_range_allowed() > - Replaced error return code ERANGE with E2BIG > > Changes in RFC V1: > > https://lore.kernel.org/linux-mm/1606098529-7907-1-git-send-email-anshuman.khandual@arm.com/ > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Ard Biesheuvel > Cc: Mark Rutland > Cc: David Hildenbrand > Cc: Andrew Morton > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-s390@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org Btw. please use git send-email's --cc-cover option to make sure that all patches of this series will be sent to all listed cc's. I really dislike to receive only the cover-letter and maybe on patch and then have to figure out where to find the rest. Thanks :) 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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E55CC71155 for ; Wed, 2 Dec 2020 20:37:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 602CD22202 for ; Wed, 2 Dec 2020 20:37:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 602CD22202 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=inb7bDMaEayOxn2g2g2Shg/RLNRtOfPCRQTHIbBx5VM=; b=AmHQGgARx9NeOkIBe7Nf7Jtnm 6aPX2TI9ROdBaLcGMRUW3RcAo2XUjypanr1XnVNviL9LmHDuJPKFHywrLzEUGjZF3K49ntvy3lILc 8hY3Hfrfy50qNM/h0gcgCLVUIJe29QXS2zmqKxG0pKW6OxlZWMQJPW2+GDnfO07ls4w6HGdQZEGco vS4AK+jV90gWIsyAYGYZlnlzBa6Wp3p9h7cYfSuCrr45pA4jhX0COhgi+z5SbMY0FsJbIXA3JcHai h21bnteG5Riaj60BZIckEkWUIngH+hPeXAM89Uf2qjFiVNsNsWKzrGWJ/cZmLainD7nxjV9BeDXwk qiv6FUYkw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYqy-0001HB-VP; Wed, 02 Dec 2020 20:35:57 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYqu-0001Az-Px for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2020 20:35:54 +0000 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B2KY1DP048621; Wed, 2 Dec 2020 15:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=AROrU5uf8FK5x25WkTE5ro/clfKSdtvAsxWSgMb/DW0=; b=rf4IyNHjmfnEiS2+lIiNIdBQqHl5jL7DT9zBRVckrF/rF4FB0uHEkbWDZd5YsiR96Dd7 EXXfwoYnvjFGsCrWK0JtkqS/QFgnsV9JX5qibBvjXB3YKQoAA6X4kGBQFKeS7TQC/31l P6XywBDf+wFWDt3W55N4mqKJV7+7OsK81XO3AtTutTXIqIrmb58FuoFAhn8Ht1kX9GHd L5nlbLO8k51y9UHheELtlgjY1X88/SIOsnjIAI4qXjDYqgt9ClulzTSDythmSYdIsw+8 H350sfvep7tgBtYiNyN0PJ80N+Rc90br0Wr5ZtaI5OYx/oH9TtD1CWWlrZZ+WEbsgaln 9A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 356dgfr1mb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 15:35:47 -0500 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0B2KY8VG049170; Wed, 2 Dec 2020 15:35:46 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 356dgfr1kf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 15:35:46 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B2KRwv9032470; Wed, 2 Dec 2020 20:35:44 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma05fra.de.ibm.com with ESMTP id 353e68acha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 20:35:44 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B2KZg9H27197908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2020 20:35:42 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46254A4040; Wed, 2 Dec 2020 20:35:42 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5A2DA4057; Wed, 2 Dec 2020 20:35:41 +0000 (GMT) Received: from osiris (unknown [9.171.12.240]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 2 Dec 2020 20:35:41 +0000 (GMT) Date: Wed, 2 Dec 2020 21:35:40 +0100 From: Heiko Carstens To: Anshuman Khandual Subject: Re: [RFC V2 0/3] mm/hotplug: Pre-validate the address range with platform Message-ID: <20201202203540.GC11274@osiris> References: <1606706992-26656-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1606706992-26656-1-git-send-email-anshuman.khandual@arm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-02_12:2020-11-30, 2020-12-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 mlxlogscore=792 lowpriorityscore=0 adultscore=0 phishscore=0 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012020119 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201202_153552_924639_9B9AC40D X-CRM114-Status: GOOD ( 26.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-s390@vger.kernel.org, Vasily Gorbik , david@redhat.com, Catalin Marinas , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 30, 2020 at 08:59:49AM +0530, Anshuman Khandual wrote: > This series adds a mechanism allowing platforms to weigh in and prevalidate > incoming address range before proceeding further with the memory hotplug. > This helps prevent potential platform errors for the given address range, > down the hotplug call chain, which inevitably fails the hotplug itself. > > This mechanism was suggested by David Hildenbrand during another discussion > with respect to a memory hotplug fix on arm64 platform. > > https://lore.kernel.org/linux-arm-kernel/1600332402-30123-1-git-send-email-anshuman.khandual@arm.com/ > > This mechanism focuses on the addressibility aspect and not [sub] section > alignment aspect. Hence check_hotplug_memory_range() and check_pfn_span() > have been left unchanged. Wondering if all these can still be unified in > an expanded memhp_range_allowed() check, that can be called from multiple > memory hot add and remove paths. > > This series applies on v5.10-rc6 and has been slightly tested on arm64. > But looking for some early feedback here. > > Changes in RFC V2: > > Incorporated all review feedbacks from David. > > - Added additional range check in __segment_load() on s390 which was lost > - Changed is_private init in pagemap_range() > - Moved the framework into mm/memory_hotplug.c > - Made arch_get_addressable_range() a __weak function > - Renamed arch_get_addressable_range() as arch_get_mappable_range() > - Callback arch_get_mappable_range() only handles range requiring linear mapping > - Merged multiple memhp_range_allowed() checks in register_memory_resource() > - Replaced WARN() with pr_warn() in memhp_range_allowed() > - Replaced error return code ERANGE with E2BIG > > Changes in RFC V1: > > https://lore.kernel.org/linux-mm/1606098529-7907-1-git-send-email-anshuman.khandual@arm.com/ > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Ard Biesheuvel > Cc: Mark Rutland > Cc: David Hildenbrand > Cc: Andrew Morton > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-s390@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org Btw. please use git send-email's --cc-cover option to make sure that all patches of this series will be sent to all listed cc's. I really dislike to receive only the cover-letter and maybe on patch and then have to figure out where to find the rest. Thanks :) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel