Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp779626lqj; Sun, 2 Jun 2024 23:34:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVY1tmu+87AMyeiFiCwUcxF4NfLJXaVUE0OEU0oaPpinpgkXG4KqpUp+exlFgjqZ0bpzqcp/sCO9Qyf4FYEmCqQQ6/UQW+8bWRyG25ITg== X-Google-Smtp-Source: AGHT+IFOtNYYNvM9K/stFwZLwn0Jnfyo86IMXDInHnLMMyUmTQ377N+Lf8IOEWdSqKLt+MbbWKBd X-Received: by 2002:a17:90b:1241:b0:2c2:1d86:f785 with SMTP id 98e67ed59e1d1-2c21d86f8e4mr2418596a91.47.1717396490852; Sun, 02 Jun 2024 23:34:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717396490; cv=pass; d=google.com; s=arc-20160816; b=ygnx+Y1PGUlcPCAKV95PTi5oBfatPJHeVhxxG63ZT7itB/HroKln8E0nkfyKUnnt8g WswXL6h44aIkKPoss/5rB4k+yzWYzIT13RFCuHkuePt/eshzwPQqtr/tzJYxtkbQzzP4 GBPadtqvaD1A1xXBZEguKrST/2wmgs8xhZZIv3H63FbX9ZctvWqxnLGgGINwU/XMJonX V/fd+gFaLzdmWHSH4S4YVHZ43+9kHrbkVEbflqBqeEfInTFonRQ4qg7W62vR9gGwU9zq QiP2cWo8GY2n1de21k8+CRag7WFR9K9X+rMn2J6sCHRRkSC+0lRFKQ049CX7s4ofv4aU 6lxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=f1NqOg7+SmYpFyjN12bPuX9ZLErrX3Av3tfkALul2/E=; fh=3LP5dMkTHmeyeyIw5ER0Oj5lWsLlolETyxT2CM78RWY=; b=0qN1Kadq1xToQBK3AbMKfmzI+GWyAEbLlU/sAODCaCByFaYMjSzGGRLYKnDK5KJb1/ fHaiweQ9V3Z2T7gN0QFDks6TOS21jecEJqsW0grnpbuALD0n6BWx2hedPtQlf6M2KoBI EnAf45d/bPjAywNL10urk+EIC/8BFihMAaEsfNIPEQ2uCokAx4xFWzqqgoPBnC+ZqE7S 4segr07A7GJJqYGU5w3u9XwvLidf9LrtIJZmc0wFkWBC7ckiu0vqMdRvoJLmaMkWYvkV 1OocWOesSxaRobh/G1ury3i5vLSjRSz0RFJLp1KIY158a/KxZbHJAL8olFDhFwEM5Ojo HrrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="r4J9r/CI"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=cbW6GPde; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Qgx72MX3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-198644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c2851fadsi6093803a91.181.2024.06.02.23.34.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 23:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="r4J9r/CI"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=cbW6GPde; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Qgx72MX3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-198644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198644-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EEE70B2175C for ; Mon, 3 Jun 2024 06:34:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 479163612D; Mon, 3 Jun 2024 06:34:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="r4J9r/CI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="cbW6GPde"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Qgx72MX3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="D5HwuqG8" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97064282ED; Mon, 3 Jun 2024 06:34:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717396473; cv=none; b=obmWZQjimpKAXO5Lv57Z5jPyjRmwDLieGw/HjqLT2ScZ0zA3bWzFqoA8tMDI8bA3N/9KjjlgVBfSoyctfjbZZUqT6MUiJHPul0a5j/tNcSysK13RKu5SENSNtw/MChdrdy/msZjEWmtYLBQ8FW2HJURbftelIMkyjzlCvNc60qY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717396473; c=relaxed/simple; bh=K41t5cNRMJLN6M4X4/lP/7QcNoH1790LXPikMhXwLtE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YTEzGN2+dqWPpLx6Bm2Ssoo4cJpudeunb7r7X/qnJLB/hNRFWcjDJRchqYM5RZZvJVyuG3Epy1hFurOyfXdLmLmvnUCUxo0xJJwLSioiqQ4fVKZ5yAPokJxjSCD6eNV7ZrvcDr7CG7hunT6Q7KUyVrgSo2nfBNCdlGXRQ6DtwWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=r4J9r/CI; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=cbW6GPde; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Qgx72MX3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=D5HwuqG8; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD1C320027; Mon, 3 Jun 2024 06:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717396463; h=from:from:reply-to: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=f1NqOg7+SmYpFyjN12bPuX9ZLErrX3Av3tfkALul2/E=; b=r4J9r/CIvwHDeheLN2a050SoQfn2+So/cNvfWhw6aOYdKr3A6umYNgaIXzGG42rN3QgAQf jLhDPOE/EHjZgBKTV8bLkV3J5Ds/gpwEDKzW9zDyRUoCHKqc1lfbfor2VXhwy7FQalXRH0 Xo7z5vEQ55wj5XDlDrmCQVI5CA1fiGQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717396463; h=from:from:reply-to: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=f1NqOg7+SmYpFyjN12bPuX9ZLErrX3Av3tfkALul2/E=; b=cbW6GPdeTLjLomVb5oiQO142BbmYOiNZ88KSCzXoX1j9lhKTzYMMEWinEXr1YbggaWB8SV MWk2kbbOkbWcTIDg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Qgx72MX3; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=D5HwuqG8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717396462; h=from:from:reply-to: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=f1NqOg7+SmYpFyjN12bPuX9ZLErrX3Av3tfkALul2/E=; b=Qgx72MX3w67PvEi5K8DJutGCGrSl2FCeX35/kfSrHgQCMDUhvqgFzEmhxxKXPE0wTuxmLa eyw8IFi8ihMY0flHrSe/QJlT8fTen0xYrvuerObm2F4ETudNhigdyiX9AK6AAGuNd7guaC x6uEfbRA6zUITF7Y+yQX7RuvgrS6SfM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717396462; h=from:from:reply-to: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=f1NqOg7+SmYpFyjN12bPuX9ZLErrX3Av3tfkALul2/E=; b=D5HwuqG8QbxGFpn9vFMdUXs0v6Ip+6S02HIMBWpOjP570u/2LccW+aRraxc3XHeqZ6WEK/ 8Dqy/lIqobxYQfDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 32B6113A93; Mon, 3 Jun 2024 06:34:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8RsMCe5jXWbTSQAAD6G6ig (envelope-from ); Mon, 03 Jun 2024 06:34:22 +0000 Message-ID: <55610402-74c3-44fe-ac0d-37958f2f86b5@suse.de> Date: Mon, 3 Jun 2024 08:34:21 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 05/11] mm: split a folio in minimum folio order chunks Content-Language: en-US To: "Pankaj Raghav (Samsung)" , david@fromorbit.com, chandan.babu@oracle.com, akpm@linux-foundation.org, brauner@kernel.org, willy@infradead.org, djwong@kernel.org Cc: linux-kernel@vger.kernel.org, john.g.garry@oracle.com, gost.dev@samsung.com, yang@os.amperecomputing.com, p.raghav@samsung.com, cl@os.amperecomputing.com, linux-xfs@vger.kernel.org, hch@lst.de, mcgrof@kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org References: <20240529134509.120826-1-kernel@pankajraghav.com> <20240529134509.120826-6-kernel@pankajraghav.com> From: Hannes Reinecke In-Reply-To: <20240529134509.120826-6-kernel@pankajraghav.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-Spam-Score: -6.50 X-Rspamd-Action: no action X-Rspamd-Queue-Id: DD1C320027 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-6.50 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; XM_UA_NO_VERSION(0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_TWELVE(0.00)[18]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,samsung.com:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] On 5/29/24 15:45, Pankaj Raghav (Samsung) wrote: > From: Luis Chamberlain > > split_folio() and split_folio_to_list() assume order 0, to support > minorder we must expand these to check the folio mapping order and use > that. > > Set new_order to be at least minimum folio order if it is set in > split_huge_page_to_list() so that we can maintain minimum folio order > requirement in the page cache. > > Update the debugfs write files used for testing to ensure the order > is respected as well. We simply enforce the min order when a file > mapping is used. > > Signed-off-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > include/linux/huge_mm.h | 14 ++++++++---- > mm/huge_memory.c | 50 ++++++++++++++++++++++++++++++++++++++--- > 2 files changed, 57 insertions(+), 7 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich