Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3675070pxb; Fri, 4 Feb 2022 13:52:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5V0yI0b7bmYIcAoppvzRF1avDd80XRugNwlxqvLDf2YD7qVluqN/Bq8Y9SPGdSlrD9lWA X-Received: by 2002:a17:90b:3803:: with SMTP id mq3mr1082920pjb.95.1644011525659; Fri, 04 Feb 2022 13:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644011525; cv=none; d=google.com; s=arc-20160816; b=hWVusoi7SjjEPEzfoKAb3U3GwAfD6g1tI2SDKEytRk1HtzfXYo9Nctf6GbzR7W8gjc KLgCON/PySGrDjQgmj+yhbvgDG/5HAk3XeAn6K2Raa+F6rAeVespDyAtSCcGWd/y/s2N 7y3jTGz7+RqKuov+ESp8IJVH99kDugw1W9TUW8rfTVG99r1EKW72VadOd0zYgQzJDY1N sHnK/dVmeCPAGWCrWaJ97pFtJToFWMDVViTBd3jPd2FQZybxhMEFFZY692K6hX/ZDVnu R7HFV5LWiYztoxyV36iv/GAeGnbr+zCDhe5FHhWK6HIAMdcMMc0Tt/GSEJr23ochA82e RhQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=BEHLOzPSMJWCThBk5PgzFKTmniiVP3kX1oT1yJwmJuI=; b=vgBvGl4VeQhCAPvewZNklkB/aBACWbnuVy/GOq52Co6iOBYqKURnWd2Dn7QTn7wkNM L648ES7YY0ekx8uQfUZBGochvDVjfKt1Gh4F6NyuzbjKVnUt8YLiqf2STWQC7igbM/bF BGXV1WToXXSjw++iWBRVsCCc2sbLDkRkWuyPi12KhZDlXern4F+QxeLEpHro8DeKXXMO TCpGmztF9Df4o/qBvxOhvP3CVAQdsIAC3j2Fjlim5QMz/Y0e1aCTQvDU4VUGCf5H6rBD tQ8WRu0UDzWrS3tzj37wRVDhZR3pTH33DQCv9NbQZ0IbOoklV0qYWDkfb/qdltZL16hX f3Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10si3043440pfl.314.2022.02.04.13.51.54; Fri, 04 Feb 2022 13:52:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350030AbiBCKNp convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Feb 2022 05:13:45 -0500 Received: from lithops.sigma-star.at ([195.201.40.130]:38198 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233561AbiBCKNo (ORCPT ); Thu, 3 Feb 2022 05:13:44 -0500 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 23CB1613AFDF; Thu, 3 Feb 2022 11:13:43 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id DCn2Sc0aGa12; Thu, 3 Feb 2022 11:13:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id A46B9614E2C9; Thu, 3 Feb 2022 11:13:42 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id N62xb5yN6wDW; Thu, 3 Feb 2022 11:13:42 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 6B45D613AFAE; Thu, 3 Feb 2022 11:13:42 +0100 (CET) Date: Thu, 3 Feb 2022 11:13:42 +0100 (CET) From: Richard Weinberger To: Miquel Raynal Cc: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= , Vignesh Raghavendra , Boris Brezillon , linux-mtd , linux-kernel Message-ID: <340602071.12640.1643883222200.JavaMail.zimbra@nod.at> In-Reply-To: <20220203104654.6cb43ea3@xps13> References: <20220125104822.8420-1-kernel@kempniu.pl> <20220125104822.8420-5-kernel@kempniu.pl> <1173246756.12597.1643879936765.JavaMail.zimbra@nod.at> <20220203104654.6cb43ea3@xps13> Subject: Re: [PATCH v3 4/4] mtdchar: add MEMREAD ioctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF96 (Linux)/8.8.12_GA_3809) Thread-Topic: mtdchar: add MEMREAD ioctl Thread-Index: hZNaN/vnabP7CZbdubDi1iosoXSpeQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Miquel Raynal" >> If mtd->erasesize is large (which is not uncommon these days) you might >> request more from kmalloc() than it can serve. >> Maybe kvmalloc() makes more sense? > > Mmmh, I would really like these buffers dma-able. > > I just discovered mtd_kmalloc_up_to(). Would this work? mtd_kmalloc_up_to() makes sense to be more friendly to the system. It tries to get memory without forcing write-back and such. But if we're out of continuous memory it won't help much. Regarding dma-able, as soon you use something like UBI/UBIFS ontop of it the mtd driver has to be able to deal in any way with vmalloc()'ed memory. Another option would be not working on full erase blocks. Thanks, //richard