Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp653631imd; Thu, 1 Nov 2018 03:28:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5fLanz9xnhhZrTWveAzBybCyjiVbcRiq0XjpF8eDEFh8Vg0zCITS1jwlNICVCFBk8ylKhKB X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr7101776plc.138.1541068121871; Thu, 01 Nov 2018 03:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541068121; cv=none; d=google.com; s=arc-20160816; b=oFVQnLx9JIcq+BYovHFRlfFxPnJYigt4tNqesrG3VnnjinCifKquUW3IOn4D5ZLHkQ lY2K0//Up4zLCCbtoQwqY740jcoRoLRJ/u9kPr+rXdWpWagCTzrrNHyAdiDr441+C9r3 aNC7yas713roIf/73r25R2qfGgdgWwBfSXq8R6qtSaz0cvLDT2nDK7XzAzv8jOQS8ds7 XjGxeJwUQmZR0JqSJnJc0bbYNve+pDJ9aZzepJF301cDrkZYY+12sEJKY6efBRQBk+bS 8ZeNtchPY8tdGKJGyZ1aluyYRNmwXlAPxM7TYsvUU7Y1RIxkdBZustfz/+360SqftEuw z/OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=P96/N/to9sdsWy8jw78nUWNkiQy5dJDOdx9cI8lztRE=; b=nk5ZA9VjO8aTBmyAGVdAjbu9L1EGcEFY9aMIeV07n3LskCoxQOllW2jYYXVpj4jG6W y9cInsvh89h0IKATNTPzyN3Nuepb6jhAFlVTjjaUEwAeM8njGpHGV/FdnGl5YJmeCZn+ q17ZuG0ghXoyy2wwggzEZomY/d0j8WKupy1v1BbaY8p1hcCuKRJEOIHop7zzsQ23/B60 bkQiwJ77/1ivDz6V2vHrUGU08Bg1ucUlxeaafJ+a7vEH5tku+AnrAscKN9QzN0yCeevY +JHJjVVJ1P9VAa6tvcBkNcyGdUb8RcmIz0Za6/zNSJKiz2Yq5vXnxD2WcsmpCk9YwP/V d6YA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n78-v6si19568861pfi.171.2018.11.01.03.28.26; Thu, 01 Nov 2018 03:28:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeKAT34 (ORCPT + 99 others); Thu, 1 Nov 2018 15:29:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:58274 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726520AbeKAT34 (ORCPT ); Thu, 1 Nov 2018 15:29:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D6348AD94; Thu, 1 Nov 2018 10:27:34 +0000 (UTC) Date: Thu, 1 Nov 2018 11:27:34 +0100 From: Michal Hocko To: Miles Chen Cc: Andrew Morton , Joe Perches , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com Subject: Re: [PATCH v3] mm/page_owner: use kvmalloc instead of kmalloc Message-ID: <20181101102734.GF23921@dhcp22.suse.cz> References: <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> <1540981182.16084.1.camel@mtkswgap22> <20181031114107.GM32673@dhcp22.suse.cz> <1541066412.31492.10.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1541066412.31492.10.camel@mtkswgap22> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 01-11-18 18:00:12, Miles Chen wrote: [...] > I did a test today, the only code changed is to clamp to read count to > PAGE_SIZE and it worked well. Maybe we can solve this issue by just > clamping the read count. > > count = count > PAGE_SIZE ? PAGE_SIZE : count; This i what Matthew was proposing AFAIR. At least as a stop gap solution. Maybe we want to extend this to a more standard implementation later on (e.g. seq_file). -- Michal Hocko SUSE Labs