Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp305205lqp; Wed, 12 Jun 2024 02:02:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqWucPK6vZlV+E5NlKD5u9ESWqoGxYTKpUYRWCpGAZVe2wDftu0WVXRqrz3+7oiFzOfum8VOVBKg4BbzPfKXkbn/fniM3r2yKj1hY9Eg== X-Google-Smtp-Source: AGHT+IELm6RKoX6WeqR99t/h1eV2vwVoxKubXIFm2ma0RWID51ATzqNgw21TXYFGjcKPQ+UhyUdo X-Received: by 2002:a05:6808:1441:b0:3d2:2833:73c6 with SMTP id 5614622812f47-3d23e1071d3mr1384712b6e.39.1718182949493; Wed, 12 Jun 2024 02:02:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718182949; cv=pass; d=google.com; s=arc-20160816; b=KY3lOdqyZH1Rg08eNQvT6Yf9Noo9Op+/ePkJ1oZnda4iS1h9B2KLpTOEai0LQ5WSk7 hrvMNIncVU8pSZ3U5+ckHxhASF+VB4e+8MtBuGggzjUQou4+q7LE8icovwVBvTVS8ebI uIzMNd9WbUc8UWkhGv5oDKgvGpYEAqHp6oji6p9H7jO8ynZOwb58bZs1BYgwCJrj0i3N BV3ts1f9TlSyPk9SKuWgmb/6H48anJ73FBVq+GDTh2NzYJf9YcSHBaHFLo02swWrFTsB IWCob1KoDeu2IXT9nukfLVvXFMUxgFHh3fpBcz5e8eNcC9HzT3S6osOaE36yFiDqNt8o mJpg== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=qX8ubfxWYSG+t5h+vmgwN8Y/8N1fgeclkZq1Y7PRvL8=; fh=MMLiSFb5H63L76FDEaeG9/rW9CzEJztgQWkH+RWvt5I=; b=WkZJr8RRDpPV4uE3tD1CxP2yTP5eWWFr27kUBok3ovRaAHhxdomy7inVyWPyfX4i2x ubt2uYjv0+sXYOmKU93zkxzZo4UabNvnbP8ngo7MEWn64NcG+MyegpisAybozp6hLNd7 wy9s96OQURaQhk3TBGoOm0tCA/lKL8zCya23T0F6KFrtmC5+mFBtZ6fsvXcAv/jqkkp5 S+AexRfkmE5Oo+rWg2WjevJ4Drg31mEchUV088t6fd+Jpwqx0j9amBY/8UTy67eVRypK +8q+e+CIIz/hgu/TVdUTPqcr2SIfF3eYOCOuhpZhAd257ggb4eifNALoQ2scXI74Fv1v +diw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gQtDCGDJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gQtDCGDJ; 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-211227-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e47862c958si8680244a12.24.2024.06.12.02.02.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 02:02:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211227-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gQtDCGDJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gQtDCGDJ; 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-211227-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211227-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 91DC2283879 for ; Wed, 12 Jun 2024 09:01:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9999016D4FF; Wed, 12 Jun 2024 09:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gQtDCGDJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aZ700U5H"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gQtDCGDJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aZ700U5H" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 327A712B89; Wed, 12 Jun 2024 09:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718182908; cv=none; b=iXEqnYZ7hvQMBh3fanBKSjgAa07UKWPEPFj+/XIJxijMVgMEAfhJMGbvclG4sPoeTqysleZul+ruHMOMIsn7ymmb6e/y6b/Mc6H9rwwaxwv/zvChkwcEx4kpy7g/VWQ22xA0j5Kd7z1e3pbTmbeD7h7MOBG8gZagDugrkzg3nDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718182908; c=relaxed/simple; bh=zW95mcY2lDdEt8aWX+3ZUEKduxRjMlZj8PPfH50hswI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sCOD4tKTO4OfM9Zt53m/UCRn4gP5NBvWIbLCmX6Y7T7xKy61o4RVNSVpMZGmJir0CGPFV0KW3ylglOVuaunNZ6XTTm+D9lnKlhkd/wCQJPNDJJBixXLBimwsLwyv5hdfQH7Rl+dAvdLezB9PoGoXo/IDJbDav0ECQBw7A7s7gwU= 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=gQtDCGDJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aZ700U5H; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gQtDCGDJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aZ700U5H; arc=none smtp.client-ip=195.135.223.130 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 (unknown [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-out1.suse.de (Postfix) with ESMTPS id 101A9341E0; Wed, 12 Jun 2024 09:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718182905; 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=qX8ubfxWYSG+t5h+vmgwN8Y/8N1fgeclkZq1Y7PRvL8=; b=gQtDCGDJ91AEpjFra2kEv+E9IdE+uEMdGDBZhYRKgfhToFVLhSnfY0Cc7hTXQsWcar9nVP BXP42YAnFHYDAUqhV0/SELJ/9tWQZRVbLkZc/ILomJvUQEGQ2fd1ecpg3ktm5vwGD6Wzlc OxsNr8B9v4KxEKkGRk9iUSGp4tzUQuU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718182905; 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=qX8ubfxWYSG+t5h+vmgwN8Y/8N1fgeclkZq1Y7PRvL8=; b=aZ700U5Hv6FRrHXSSqAKdtx8YKmbjderymirydAJB3UnIZnrKPdVGZWSEZ+dvCMljc3H1M CErCY/xApYgePKDg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718182905; 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=qX8ubfxWYSG+t5h+vmgwN8Y/8N1fgeclkZq1Y7PRvL8=; b=gQtDCGDJ91AEpjFra2kEv+E9IdE+uEMdGDBZhYRKgfhToFVLhSnfY0Cc7hTXQsWcar9nVP BXP42YAnFHYDAUqhV0/SELJ/9tWQZRVbLkZc/ILomJvUQEGQ2fd1ecpg3ktm5vwGD6Wzlc OxsNr8B9v4KxEKkGRk9iUSGp4tzUQuU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718182905; 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=qX8ubfxWYSG+t5h+vmgwN8Y/8N1fgeclkZq1Y7PRvL8=; b=aZ700U5Hv6FRrHXSSqAKdtx8YKmbjderymirydAJB3UnIZnrKPdVGZWSEZ+dvCMljc3H1M CErCY/xApYgePKDg== 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 D15B2137DF; Wed, 12 Jun 2024 09:01:44 +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 9EKnMvhjaWZqZgAAD6G6ig (envelope-from ); Wed, 12 Jun 2024 09:01:44 +0000 Message-ID: <407624c7-5edc-4940-bf71-4134207b1458@suse.de> Date: Wed, 12 Jun 2024 11:01:44 +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 v7 03/11] filemap: allocate mapping_min_order folios in the page cache To: "Pankaj Raghav (Samsung)" , david@fromorbit.com, djwong@kernel.org, chandan.babu@oracle.com, brauner@kernel.org, akpm@linux-foundation.org, willy@infradead.org Cc: mcgrof@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, yang@os.amperecomputing.com, Zi Yan , linux-xfs@vger.kernel.org, p.raghav@samsung.com, linux-fsdevel@vger.kernel.org, hch@lst.de, gost.dev@samsung.com, cl@os.amperecomputing.com, john.g.garry@oracle.com References: <20240607145902.1137853-1-kernel@pankajraghav.com> <20240607145902.1137853-4-kernel@pankajraghav.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20240607145902.1137853-4-kernel@pankajraghav.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.29 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_TWELVE(0.00)[19]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[sent.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[kernel.org,kvack.org,vger.kernel.org,os.amperecomputing.com,sent.com,samsung.com,lst.de,oracle.com]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email] X-Spam-Flag: NO X-Spam-Score: -4.29 X-Spam-Level: On 6/7/24 16:58, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav > > filemap_create_folio() and do_read_cache_folio() were always allocating > folio of order 0. __filemap_get_folio was trying to allocate higher > order folios when fgp_flags had higher order hint set but it will default > to order 0 folio if higher order memory allocation fails. > > Supporting mapping_min_order implies that we guarantee each folio in the > page cache has at least an order of mapping_min_order. When adding new > folios to the page cache we must also ensure the index used is aligned to > the mapping_min_order as the page cache requires the index to be aligned > to the order of the folio. > > Co-developed-by: Luis Chamberlain > Signed-off-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > include/linux/pagemap.h | 20 ++++++++++++++++++++ > mm/filemap.c | 26 ++++++++++++++++++-------- > 2 files changed, 38 insertions(+), 8 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