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 315F0C7EE23 for ; Thu, 8 Jun 2023 10:14:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B5D008E0002; Thu, 8 Jun 2023 06:14:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B0D708E0001; Thu, 8 Jun 2023 06:14:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D5D98E0002; Thu, 8 Jun 2023 06:14:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8A1418E0001 for ; Thu, 8 Jun 2023 06:14:09 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6222DC01C8 for ; Thu, 8 Jun 2023 10:14:09 +0000 (UTC) X-FDA: 80879170218.01.D489B97 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id A5FC2100014 for ; Thu, 8 Jun 2023 10:14:07 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YCr1Wl0Y; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686219247; 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=pp1skOxyiIndrCwRHdsolduOFYDDuJKNDO0O6RT8OJA=; b=aYOUo9/VdpeRrwkcGXS4uR+b6OBfgJjl/jGuszu4Nley3nP7mNyrX0QQygLjVKaLznItTm pjk6vjHSudzyj/lZAhwe8HL2PweP6fVFsv7jSxV0VCEy+AR+zvkryZHcQACuz1t0Qv6eBV 0UesU/Kimzrky9EEwiA05LwDbq6p9W8= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YCr1Wl0Y; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686219247; a=rsa-sha256; cv=none; b=noIDw1q9jw6hTtqh3wLo2DMrEXFx0JajEkiJVzKYInIXVUGr1sPRmghAIDEk/1nwNeYuDK wvhdUBDEOATDfhLTOS3/hAmJnr3mExpfk8waAAP8rJb7c95bGG0dr7RR977eBqGc8ZjNBC V79iSTTXtbDD7ISYjOslZkde0bvjgrc= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 84C5064AFE; Thu, 8 Jun 2023 10:14:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84C5BC433EF; Thu, 8 Jun 2023 10:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686219246; bh=A/yf/LULqe7cvpY9FNQQv9+HJYr9a5XLS/1CEJh4cUI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YCr1Wl0YP84wvIO2VnanRSDJFX8gKazY0fIbIaQQpeY8GwiC4hJKVKNwtW0q4LCzf t93zJ1seq5bE9yZRw83p/S4eY8irVRPlLZHE4zT70ZBfYBB8OH/X3eb29hyfK3F353 XbqPetAS+vr27HRFX6ytssh7f8WeSAZBa142EB+1TSWnufkB3VYtvjcFHm/6n9j9GZ jczUfeXFIjQA7EBXdX7DCGVMTVFYZ+tnHcgOjGY6svebxlSssNpgVxMIwRUPbwu7Dc NLTXt4JHsFOjeQllk02r4Aoh9kBaJnSVJN2MLSjmPTVdPELaClUG4Na86StyoAV/Jw Vnae3p4wKE9HA== Date: Thu, 8 Jun 2023 13:13:40 +0300 From: Mike Rapoport To: Michal Hocko Cc: Haifeng Xu , David Hildenbrand , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mm_init.c: add debug messsge for dma zone Message-ID: <20230608101340.GI52412@kernel.org> References: <20230607090734.1259-1-haifeng.xu@shopee.com> <34f32148-24c3-09a3-8bec-9515139e15b1@shopee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A5FC2100014 X-Stat-Signature: zny4ai5yc9c6ehm94dq1i67qmtt5s6e5 X-Rspam-User: X-HE-Tag: 1686219247-261282 X-HE-Meta: U2FsdGVkX1+q4WQBUj3yrEknENV2TmWPZs5Ru4eUMVJKFsZ+R6Zt1/0NJBlX2QnH/tQAirW62+g4q3vf/O0Df4fJ9VyTybOhONyaZRq3jfpRQUjMvOPkrEUaK7T5faP8ESrpIE0GEK0Vskn1qXXZKBN799Pm5oOfjh5aFVKVuqJR87P1eYGfqa7XAXjIwzG8anneUrx0fTfsexdsi4vgIWZXRl12jlsYitBedvYS2pRycveb01gwxmDv5f6zhdrmFdbGcgcpA8LXEiwiDWmq/QBzaKkNrgECMFZs2hno+LQWTN7qTVOsmaWaEvPNSDPZVv61HMLO/jl4hjj0fNhWmrNZBTa7soXMs3NtRS9/qNqSZ5veVLgeIheyvHnjTQV6avafZDO4T0L76jUirKoyb93cjo9tq7+IIfZOLc22w17e+kbxuJsX7XpN3g0vOb97J7bqwCvFA/sw7SWlwz9uYiadAeUVzrlVZBHQoh9tNuOTfZvbH0+1tDIg07fa7FjD98erxwXwOSN7ZznLjWFDmWM1ky5xN4M/0K8EWrJtxH44RmtQ7LlT4YAryKkZywAUlKHIVQeRT/4gnMp/XQGh4XFi6+09i02sZc3SFzywJYq+xpmeelr7SZ9H/i8ItCAMUD0s/POnuZs7GkyrPLq5WnsRPWZaNttWz/4m462HGyJ2FdKKJnnMYBZszqcgchGKQ/NG0Yy/6XOTltKohP+ThIxxFd89DDuu60moUh4ZV43GdD64uTJspcctsQLIlqUSDFXxHm2vi1SidYQOQOpL9G/o2hO7J3heQaNW1HU50qZoGd75E7snPE8z8nFwSP+e7I0f5ErT5wDUGKey6Yo0mRGhnotn36Z6goTTyq2CKRC98zZyxFjG0zlKKl4vscHWvY9rytWOayiQkpLPoo13xUkdoeotEc8iP/uqRTkGS2g8MZa6AQIri4L1jlnINWwNB92cNjoXAK6pAJyopl2 /c3lmuX8 Bx47dm0/DoROz8ihIlF9gYlm7xRnBdo20p6Er9rMNBJ8DBm6HdB7HImHfaUckA+V3GTIWaYDJQhq2xKCnYX6ueYiMvk96iB1T1zF5Vle7r1Fix8S721Q9cdxBJpDyxcEru4/abQMvuPwoZZH/CG3rwgmrplTpXqXrT9r+VNSHqLCSgTfZ0GM90fJ3cZKQIyF9rROHy+V9rYw+4XKeRqYdgTgAR4Yyvq6N1izRVnRB+B9KOHuUpocIz+GFBRf1oW7X2XKmvXui8K/y4eGU/Sey3UQsxRCtL8yrlxK9leFbHJjncl0ZxT+Ar/7D5NEbRrJiHyjr9NxTsrM1KQU= 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 Thu, Jun 08, 2023 at 11:18:02AM +0200, Michal Hocko wrote: > On Thu 08-06-23 15:38:48, Haifeng Xu wrote: > > > > > > On 2023/6/7 18:22, David Hildenbrand wrote: > > > On 07.06.23 12:16, Michal Hocko wrote: > > >> On Wed 07-06-23 09:07:34, Haifeng Xu wrote: > > >>> If freesize is less than dma_reserve, print warning message to report > > >>> this case. > > >> > > >> Why? > > > > > > I'd like to second that question, and add > > > > > > a) Did you run into that scenario? > > > b) What can an admin do in that case with that error messages? > > > > In theory,dma_reserve shouldn't exceed freesize, so the error messages can remind us > > to verify whether the configuration of reserved memory is correct. > > I am not really convinced this is worth touching the code TBH. The only architecture that sets the dma_reserve is x86_64 and it sets it to the number of reserved pages in DMA zone. There is no way freesize will be less than dma_reserve. I'm not sure that in general dma_reserve has some value now, but that's a completely different story. > -- > Michal Hocko > SUSE Labs -- Sincerely yours, Mike.