Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5864269imd; Wed, 31 Oct 2018 03:20:36 -0700 (PDT) X-Google-Smtp-Source: AJdET5dvc+/faC9Jtb3VTxgMCxcBNjlX2nFNO+F3jB1V5Wb/TV1FNdAa/HH08JCFkuSMiTFJAHLi X-Received: by 2002:a62:564e:: with SMTP id k75-v6mr2734006pfb.33.1540981236457; Wed, 31 Oct 2018 03:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540981236; cv=none; d=google.com; s=arc-20160816; b=WrT+UOjWkYvucxkhmbby8XrePQYX1oYE3PGq76kxD3abJmeydC+JFMsedWb67ZcKi5 vC22YTkg0Gf6lKmCJfntSLt6flGR9M7RgaYdfT9bcYOxejc1rSYSzOlgSssk5QVeJEmC 5dJlH3ClXV0Zul6der+CcKRorAvd4AjTRvaWZgG3ANt1NOBhsTIyPrBPQ9LTdFhmfvRj 8zpcEmi/0eS3/hOmNiLDiNMue7RqyZ4GINae6beC+KcB02Zdbud9CXTAjicYFZGbpvET ryUFKomG8I2lq1n4Kr7ulF5KADELqyOmtthZceL16JB3j6th3q2xUgEiDe6udXyW8gPD 96Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=8+qbFfXSe9bM9ND/y5dsxH9Xom7kf2/3R97kKwIzqtE=; b=pFkrOAS04iLlGlhjy2U3qgE2KI8ORGucYwVoNKu33S97NtJe1IftYoiEZRYPI9AbmS ihG/+iM252pYo0zrPwSA/c/0p0WhmtCsi6rC2uYWeLqUOkKYmCIxpVmStHIXPDGPIgT6 K4MIeUZHUVTQJw7ccAQmnoJ3URvrNervZpTs6w8LBYYJZWnnKmJA4BoFMyASxvqbvCI0 M0CO/7ZpQTRDOCDpfPF8QwN7xItK4RijxMmeYZ15Y/r1Y7qVlPgDTfHmhtexmk5lYK7R do2+3EsSQBOacKCM5HKJwSMyVl3XnMxC67rAFS3EgAWXMklm8ESleOARbg+92aCzUvgA g1GA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si26493463pgd.25.2018.10.31.03.20.19; Wed, 31 Oct 2018 03:20:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbeJaTR1 (ORCPT + 99 others); Wed, 31 Oct 2018 15:17:27 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:2310 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727852AbeJaTR1 (ORCPT ); Wed, 31 Oct 2018 15:17:27 -0400 X-UUID: a01d6aa4ff4e453aa6a678f0eac8928f-20181031 X-UUID: a01d6aa4ff4e453aa6a678f0eac8928f-20181031 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1806330942; Wed, 31 Oct 2018 18:19:43 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 31 Oct 2018 18:19:42 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 31 Oct 2018 18:19:42 +0800 Message-ID: <1540981182.16084.1.camel@mtkswgap22> Subject: Re: [PATCH v3] mm/page_owner: use kvmalloc instead of kmalloc From: Miles Chen To: Michal Hocko CC: Andrew Morton , Joe Perches , Matthew Wilcox , , , , , Date: Wed, 31 Oct 2018 18:19:42 +0800 In-Reply-To: <20181031101501.GL32673@dhcp22.suse.cz> References: <1540790176-32339-1-git-send-email-miles.chen@mediatek.com> <20181029080708.GA32673@dhcp22.suse.cz> <20181029081706.GC32673@dhcp22.suse.cz> <1540862950.12374.40.camel@mtkswgap22> <20181030060601.GR32673@dhcp22.suse.cz> <1540882551.23278.12.camel@mtkswgap22> <20181030081537.GV32673@dhcp22.suse.cz> <1540975637.10275.10.camel@mtkswgap22> <20181031101501.GL32673@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-TM-SNTS-SMTP: 31A53AD034CBF0DCA792824C567B80F5D0BDF81AFCA42A2E2F46CE800FDA46072000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-10-31 at 11:15 +0100, Michal Hocko wrote: > On Wed 31-10-18 16:47:17, Miles Chen wrote: > > On Tue, 2018-10-30 at 09:15 +0100, Michal Hocko wrote: > > > On Tue 30-10-18 14:55:51, Miles Chen wrote: > > > [...] > > > > It's a real problem when using page_owner. > > > > I found this issue recently: I'm not able to read page_owner information > > > > during a overnight test. (error: read failed: Out of memory). I replace > > > > kmalloc() with vmalloc() and it worked well. > > > > > > Is this with trimming the allocation to a single page and doing shorter > > > than requested reads? > > > > > > I printed out the allocate count on my device the request count is <= > > 4096. So I tested this scenario by trimming the count to from 4096 to > > 1024 bytes and it works fine. > > > > count = count > 1024? 1024: count; > > > > It tested it on both 32bit and 64bit kernel. > > Are you saying that you see OOMs for 4k size? > yes, because kmalloc only use normal memor, not highmem + normal memory I think that's why vmalloc() works.