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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90150C4332F for ; Wed, 25 May 2022 21:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238386AbiEYVaT (ORCPT ); Wed, 25 May 2022 17:30:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344022AbiEYVaR (ORCPT ); Wed, 25 May 2022 17:30:17 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C3267CB15; Wed, 25 May 2022 14:30:16 -0700 (PDT) Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24PGthwZ009939; Wed, 25 May 2022 14:30:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=B4J2Eg9iyW/atDTlhXmByB79eDauG2pzAiyX4hQMMts=; b=qiM+V/7ryI+IVlfd50Sdw9wlqwDFU1+FtROfGZQdMWa8+DvKmAQWCH1huadkHgdwbDij UNN30S61V6xjhy3GBmqrCLko4zknpBW8zMi6o661TDUqL/WBljwPDbBeCFWUrOcpgObE T9kDwRw5pEz4SMt7uFPPlGpTRYisouo2UPQ= Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3g93uph15h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 May 2022 14:29:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T3PpJNsI+LxVadwY38MZaNsE3JlK4Lo6QqkKzL6lRdb2l2xa4wBRUAmUqAUUDz8DpmIbOit45bvq4Pvaws1Fm/Bgd4gWR+F3x0Mr377nGwo4nbTzrlirSnuAp5b0qyZ/cN/wgkIZ40Tj0jClPRxZkKDqDZXOaPnWfSYJ7tV5pQUOUisKVGN3x8+QVNcbgoKmJEl+BtoZQDlTxzIWjitoW47ZGOA08/6/zy4chfpqxCtOZHJ0Ik06NHR8y9u/x1LjSr3XSOpx17OABSVMKix2W7K7pZwxI6Ga72hyB0HZEyqd3C3WqW/A35f/vhv0yDd7pEId8XrHF3SHteg7CJNM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B4J2Eg9iyW/atDTlhXmByB79eDauG2pzAiyX4hQMMts=; b=EXTitDgBkNXb5sAqHHt8wJA3M1wrep49dRBKplU6+YPay5N9x0ow0ErooIFPOHvdvXROnhGzqSLOkheWhib+CblsjYJ4MSkuWIT4jvKRM8kuDVUpnhnkZqDIhvpXV2s42RLXmjyE1d61Hb02yDJXXaeZrZJai8S7JEI6MHNjxFc68bgnq+aRK2bppVXHAeOc3//pzhIkoXHRPbfM/p2MhSW3uFDFaGbAiibe+gZnuRBLs4SYWgAh8Da0qLp5FJUokxzZYBiZAlK5wmNQ1KsZ29d/xc8QUFwo4m4867T3tReNp2p048JsTKkpPQaSdiqkYqPmGd0jWWnEWkxGW3oTTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from MWHPR15MB1791.namprd15.prod.outlook.com (2603:10b6:301:4e::20) by MN2PR15MB3168.namprd15.prod.outlook.com (2603:10b6:208:a5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23; Wed, 25 May 2022 21:29:57 +0000 Received: from MWHPR15MB1791.namprd15.prod.outlook.com ([fe80::e17e:e90d:7675:24b8]) by MWHPR15MB1791.namprd15.prod.outlook.com ([fe80::e17e:e90d:7675:24b8%11]) with mapi id 15.20.5293.013; Wed, 25 May 2022 21:29:57 +0000 Message-ID: Date: Wed, 25 May 2022 14:29:54 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC PATCH v4 05/17] iomap: Add gfp parameter to iomap_page_create() Content-Language: en-US To: Christoph Hellwig Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz References: <20220520183646.2002023-1-shr@fb.com> <20220520183646.2002023-6-shr@fb.com> From: Stefan Roesch In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) To MWHPR15MB1791.namprd15.prod.outlook.com (2603:10b6:301:4e::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a3f7c56-4008-4407-d687-08da3e95b70a X-MS-TrafficTypeDiagnostic: MN2PR15MB3168:EE_ X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZJejwShK5B9Rgw0OJPsuhCp6VIBMnfF+exFTscye2FDma150hyr3ZIrPt98H30UFFvo/eDfcNG/KMuV4BAAw36thpkT9be7VacS+Er1I0ycS+b4IZyVCveADj7zoHmfItzqt2EhzVG45cY+jL5gt6tDY0+MbchjL7S8r3bWUba0FyviMaFfkL7z8zKSQ/JAkhpZQ+9D65VWVn2GEQh+PbwxYhOPsUMbpVs8QK3JrleJgqDq2qhdgkNHf9/gn8sNlHFdy387qVMKMlepyPFNnATAmnibUi2YCLA1cXHED8AcPKypH83UDpWjQQrN8TJNw1BZEh5ZXe+mLqn0ZMBkinYc575PyhHrTBwleFprb9aYnyyOxzMKcquO+NmzNsMqz6iei1SaaZ4f/WEqfUXGv1rmLcgPzn3OXMiPbMhEGZ7s1zndyL7SUkTbt/hYtq0mEO/NZq6kO/QlR98vcIpL05kYXdBu+OPQACRAguMjnuf3gPVITW9jG4bkiJGyH69ufuunG5+vQW3MYl5OVE+pQNsO0ikTce8uRuwkV4ZonSFJ8RIABwwerp/6iScgZOfJWh+dcFzkGiHIeBcwh6bNu/B5rfPzpPHLgOlZjvrw6jENp6TsrJmC430ezFWpS4vWCelk9OtpN7Nuw1LGpIjoqjzB2YMDno51Xg9kSoFaL/O2Vdm9+hdjt84CVKmT1ykZz98rj1pvH9nem94UedJNdSsN4MGhgo2y59MeOEsTkLvA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR15MB1791.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(2616005)(186003)(6486002)(86362001)(66476007)(83380400001)(8676002)(8936002)(6512007)(6916009)(6506007)(53546011)(31686004)(316002)(38100700002)(31696002)(66556008)(5660300002)(4744005)(2906002)(36756003)(66946007)(4326008)(508600001)(6666004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?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hUUVTcWcyMHdTbHNX?= =?utf-8?B?WUQzTHg4TnlDcXFWUHB5V3ZQNkVQMmZoQkpWYlg1dXdJZndlWG5GZ2NicDM0?= =?utf-8?B?OFM0UCsxWE1kNUtubk5pY09oTS92dFlWRS9CZCt5MGduY2xUUUR6WUlQU0hP?= =?utf-8?B?ZnlPYk9kbzFDT3l5OFU5bG5BUFdTdFRnaTdMRDBXK1NrNmVzbGwzc3pRdnFX?= =?utf-8?B?eUsySWlVaDYyVFVxQ3FRSmJaeEhibGpDVFJ5ZFNoRkpoUUtEMkQ4R1kraTFa?= =?utf-8?B?S0p1SVFXejBxaUpDK3pUOTV1Tjk0SE9mdDJQVFdkWWthVlcwSW9oNWFTaTNU?= =?utf-8?B?L21XT20xUzYxRkRpa0NxbmtXTkMxTlljYkd3dnhya1VWYjRwTzNyV25YaTY3?= =?utf-8?B?aTRKZWNtMWs5ZHJkeTc0cVU0ckZ1VFBWUjFWTmVMbGdncStDSmhZMFpHZkZL?= =?utf-8?B?RGRkZWRlUEJXOVh6SDNaaDlVeHhMalVTNUQxOEFmTUxzcUtjbjNtZkR2UHBE?= =?utf-8?B?TFJ1c3JrdSttUU5zalgvaFduUCs4SFBqOFJ6alFNbXR2b29xY1pRTldRU1RO?= =?utf-8?Q?t6K/PKBP1tlt/IdM=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a3f7c56-4008-4407-d687-08da3e95b70a X-MS-Exchange-CrossTenant-AuthSource: MWHPR15MB1791.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2022 21:29:57.0836 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d7bXgJQ8EV5K0mwV4wcqWCjmF80Hp7FusCToYtcaMdFbMU7FbugSbFRKkjt7VBZP X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR15MB3168 X-Proofpoint-GUID: pKMW8Q8jUnMXj7ZZzZYgIqZmE2KiN98o X-Proofpoint-ORIG-GUID: pKMW8Q8jUnMXj7ZZzZYgIqZmE2KiN98o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-25_06,2022-05-25_02,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 5/22/22 12:21 AM, Christoph Hellwig wrote: > On Fri, May 20, 2022 at 11:36:34AM -0700, Stefan Roesch wrote: >> - iop = kzalloc(struct_size(iop, uptodate, BITS_TO_LONGS(nr_blocks)), >> - GFP_NOFS | __GFP_NOFAIL); >> + iop = kzalloc(struct_size(iop, uptodate, BITS_TO_LONGS(nr_blocks)), gfp); > > Please avoid the overly long line. Fixed. > > Looking at this I also thnk my second suggestion of just passing the > flags to iomap_page_create and let iomap_page_create itself pick the > gfp_t might be the better option here. Replaced the gfp paramter with a flags parameter and decide on setting the gfp flags in iomap_page_create.