Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2174903pxu; Sun, 6 Dec 2020 22:26:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2wuB2ddTjAGD+v0RPdaDd9EIHPTYTIDLtJfqaROR3GjZC66ji3vXkhsw7ajHrO6wOI+8h X-Received: by 2002:a17:906:a2d0:: with SMTP id by16mr17203545ejb.207.1607322380871; Sun, 06 Dec 2020 22:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607322380; cv=none; d=google.com; s=arc-20160816; b=mMUNmSx3Fs6YApOGSTSRyRTSI0CtdEtCyTkB+rNgJaKp+QnRK3BnQcMu61RhOImqTf tXlecIkDyIuW7ry+zMJTIi60zGirXutYoWxHALAiZ+u/LOB7MR/dF+PZV0cjEPk6LBjb RO+2IN3Nen5webZBTD8Bri5Yq3txUrCq42CXwwzNFPYxJzfTOXe5rhRddkI8G/ziTy93 CYs15fenfPUJ5w19AXUqxUjLcI/OEWaFYvpsQT6MEpCroJcemUlhg3Jqkp0nEP7TD05d 8q9ixt/NxvmURyLhs/j4mUcYSWtfRGbIxcVfznLZbGkzHOB6vp2f/iDzLyJaJYf0PmLa 5tPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=fBP4mWJSZ04Q9CT3hoILVOAje37IO6HJzymBLKwRFEs=; b=seB4DmKOvcFYiiwq8+YNrzklBnqWUg7Koh6/bzMCnLN4jzZlISsQ9cCOw2B/8OmoB4 ZENy6BgR7VEmPIv/RvLF3dSfJCtZw0NJsbJcFjbdJ7UnwDd49tbvQz5dVBC/ioee/xg+ 07PINbNAMwpppt1jwyhi2gAcR32zM/QDk8/8A+dTo1oEgDIFCP6+F3J8o+DCOTUk4XaW pGnksKq7xQcXDtcRdeIBTm2IorYyA8Ovrc87Dm1d+swCDbiTHYQm2n/0VWv3ayyJ3oDr 9AMPwH1lJ8M3cAX4gpagEZjqhaPWthU8Z/oldcKvzKg4Ye2djr6VZRCALdCHQEfRLtyx pEkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Dk5DNVOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si6153819ejq.261.2020.12.06.22.25.57; Sun, 06 Dec 2020 22:26:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Dk5DNVOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbgLGGY1 (ORCPT + 99 others); Mon, 7 Dec 2020 01:24:27 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:64780 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgLGGY1 (ORCPT ); Mon, 7 Dec 2020 01:24:27 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20201207062342epoutp027a4179a00e7fff1f4eef501cac85aafc~OWwuOh3sq0030300303epoutp02U for ; Mon, 7 Dec 2020 06:23:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20201207062342epoutp027a4179a00e7fff1f4eef501cac85aafc~OWwuOh3sq0030300303epoutp02U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607322222; bh=fBP4mWJSZ04Q9CT3hoILVOAje37IO6HJzymBLKwRFEs=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=Dk5DNVOo6Yvvgb99BsHHzt+VZR8SJkSllStJz6Zn57wCVvWTePeTlGRMElKYqGBms tVOiU6VtdoWBnCJ6V7E9NmNwTU6G3S4NNP2Wf1lIN2riDEWli93gKArUwabOHFRKQy 7FuXXP+W9556XBTZIwf0CtNsKKiuJ56s4JWnG6FU= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20201207062341epcas1p316c187679875dfe5ce454263df2fb2a3~OWwt3Ge5Z1514615146epcas1p39; Mon, 7 Dec 2020 06:23:41 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.165]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4CqCth6jRYz4x9Q0; Mon, 7 Dec 2020 06:23:40 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id AB.02.09577.66ACDCF5; Mon, 7 Dec 2020 15:23:34 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20201207062334epcas1p48080d035311cb446cce68e813065fbf2~OWwmmVGDZ2156321563epcas1p4b; Mon, 7 Dec 2020 06:23:34 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201207062334epsmtrp243e82dd1e88e6f4a3774272b84741a42~OWwmloUb62830928309epsmtrp2q; Mon, 7 Dec 2020 06:23:34 +0000 (GMT) X-AuditID: b6c32a39-c13ff70000002569-27-5fcdca66b50c Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 84.81.08745.56ACDCF5; Mon, 7 Dec 2020 15:23:33 +0900 (KST) Received: from W10PB11329 (unknown [10.253.152.129]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201207062333epsmtip14ea44c2d24bf1eb66c3040541ccc6bac~OWwmXu0Wi1719417194epsmtip1c; Mon, 7 Dec 2020 06:23:33 +0000 (GMT) From: "Sungjong Seo" To: "'Artem Labazov'" <123321artyom@gmail.com> Cc: , "'Namjae Jeon'" , , In-Reply-To: <20201204125730.GA546513@xps13> Subject: RE: [PATCH] exfat: Avoid allocating upcase table using kcalloc() Date: Mon, 7 Dec 2020 15:23:33 +0900 Message-ID: <40be01d6cc61$7d23cac0$776b6040$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGAh9ZISCX29VPYFR7X7vXspJxNNgFOHEJzAktfIl8Cd4Eq1KpnILpw Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpik+LIzCtJLcpLzFFi42LZdlhTVzft1Nl4g3XrxC023fzGarFn70kW i8u75rBZ/Jheb7Fg4yNGB1aPnbPusnv0bVnF6PF5k1wAc1SOTUZqYkpqkUJqXnJ+SmZeuq2S d3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7QRiWFssScUqBQQGJxsZK+nU1RfmlJqkJG fnGJrVJqQUpOgaFBgV5xYm5xaV66XnJ+rpWhgYGRKVBlQk7GvZZ2toJVPBXv9i9hbGB8xNnF yMEhIWAisX8ZVxcjF4eQwA5Gib+Xb7JCOJ8YJT7N3MTSxcgJ5HxmlNi8yBTEBmlY838XM0TR LkaJWTOOsUA4Lxklnp7/xwRSxSagK/Hkxk9mEFtEQE/ixM4dYB3MAl2MEo93/QYbyymgI/Ho +yVGkDuEBTwldi7UBAmzCKhI9LQcYgexeQUsJXa83M8KYQtKnJz5BKyVWUBeYv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aKn5RA7iM0rYCmx4+V+VghbUOLkzCcsIOXMQAvaNoJN YRaQl9j+dg4zxPkKErs/HWWFuMFN4ur6vUwQNSISszvbmCcwCs9CMmkWwqRZSCbNQtKxgJFl FaNkakFxbnpusWGBUV5quV5xYm5xaV66XnJ+7iZGcHRoae1g3LPqg94hRiYOxkOMEhzMSiK8 alJn44V4UxIrq1KL8uOLSnNSiw8xSnOwKInzXug6GS8kkJ5YkpqdmlqQWgSTZeLglGpgurxE keOYfP387Ie6mjwiITuk/ljq33+X6lomYagQttFXYccJ+8db9Lcbx8/j4BLMDzloFlX02IMz rJ1BQsI8co3YD4HpK+TD707Mm96mqK/+dfH+zn0szgzpqxQTim9OVTtrevuOvG4LZ23HMiZF s7srpqp2lZgLxR9atVLjK/uK1gkaW5a4u89zrFeZUHhrpdoEm+d/N7JzTMjntdhT3u/aObdP xl0z+0ie8v7I30WZ/Np5+RG7z0ftCfXo2njPbWVU9J2DYqENmx5Kt+l3BilVSj4p99ow8cCy wrOZMT0KiROdIvZs5VYW1dXWavVKaWW7qnZL8M/1d3X7jb8v4PfM2Li+bnK5esUJWSWW4oxE Qy3mouJEAPrIdcT9AgAA X-CMS-MailID: 20201207062334epcas1p48080d035311cb446cce68e813065fbf2 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201124194858epcas1p49cacda6a9b4877ff125f25f4dc5fcadf References: <20201124194749.4041176-1-123321artyom@gmail.com> <001101d6c867$ca8c5730$5fa50590$@samsung.com> <20201204125730.GA546513@xps13> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > I have not yet received a report of the same issue. > > But I agree that this problem is likely to occur even if it is low > > probability. > > Perhaps I should clarify my setup a little bit more. > The issue can be reliably reproduced on my laptop. It has 8 GBs of RAM > (pretty common amount nowadays) and runs an unmodified Fedora 32 kernel. > Also, I use zswap, which seems to be contributing to fragmentation as well. > > > I think it would be more appropriate to use kvcalloc and kvfree instead. > > I do not think this is really needed. > Upcase table allocation is relatively large (32 pages of 4KB size) and > happens only once, when the drive is being mounted. Also, exfat driver > does not rely on the fact that the table is physically contiguous. > That said, vmalloc/vfree seems to be the best option, according to > kernel's "Memory Allocation Guide". The address range available for vmalloc() allocations is limited on 32-bit systems. If all kernel codes that need non-contiguous memory of the size order 1 or larger try to allocate it by only vmalloc(), the address range for vmalloc() could be insufficient. So, I think it would be better to give kmalloc() "one" chance. I know that kvmalloc() only tries kmalloc() once (noretry, nowarn) and if it fails, it immediately falls back to vmalloc(). Therefore, I think kvmalloc() and kvfree() are the best solution for solving the problem you are facing and the problem I mentioned above. Could you send me patch v3 that uses kvcalloc() and kvfree()? > > -- > Artem