Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbbBRNMl (ORCPT ); Wed, 18 Feb 2015 08:12:41 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:26549 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbbBRNMk (ORCPT ); Wed, 18 Feb 2015 08:12:40 -0500 MIME-version: 1.0 Content-type: text/plain; charset=euc-kr X-AuditID: cbfec7f5-b7fc86d0000066b7-7e-54e48f315895 Content-transfer-encoding: 8BIT Message-id: <54E48FC3.5040902@partner.samsung.com> Date: Wed, 18 Feb 2015 16:12:35 +0300 From: Safonov Dmitry User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 To: Gioh Kim , Stefan Strogin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Joonsoo Kim , Andrew Morton , Marek Szyprowski , Michal Nazarewicz , aneesh.kumar@linux.vnet.ibm.com, Laurent Pinchart , Pintu Kumar , Weijie Yang , Laura Abbott , SeongJae Park , Hui Zhu , Minchan Kim , Dyasly Sergey , Vyacheslav Tyrtov , gregory.0xf0@gmail.com, sasha.levin@oracle.com, pavel@ucw.cz, stefan.strogin@gmail.com Subject: Re: [PATCH 2/4] mm: cma: add functions to get region pages counters References: <54DEFA03.6010308@lge.com> In-reply-to: <54DEFA03.6010308@lge.com> X-Brightmail-Tracker: H4sIAAAAAAAAA01Ra0iTYRjl3Xd1tPxcmi/+yBhIF8pK/PF2oaSLfD+iDLTEApu6VNrU9uXQ fslm4D5rS8XbnKa4SU7zMjWXJeVcXpMiQ6iYdJkWWcnUpWllzv3If+c5zznPOfDQmLgXD6HT M67LlBlSuYQU4qN/Byf2RuhdsftLiwTI2NpMok8zNTiaa5wi0bR6AaCy8jYCNRZqSNStraCQ tshEofEeI4kmm1cJdN/hpFDtYD6BGjyzFHKOPCORbrGfQiVVIejnsBFD9Y53GJqw6QVo/Nsq hUorlig03DZGoDaNMCqYHdfdFrAPDU6KrSqoJFirRUuy1rliiuW/vxawQxUrOPve3oGzLb+/ Clj31Fuc7fvxWMDqOi2Avde0SLHz1m0s375MxPgnCI+kyOTpKply39HLwrR8dxmR9ZzM8fSW gzxQT/DAj4ZMJLQVtwMf3gpfTraSPBDSYsYMoPmjA/MuREwAXCqZxHlA0xgTCh2vrnppjNkJ nV1PCZ/eDaBppIP06SOga3mB8mKcCYOGhhfA6yXXwmo0l7x0EBMP7w7MYF5vIHMTwKZHWtw7 YIyOgP2mlvXgLcxpWKJVrx8VM90A8rOBXuzH7IBqG0/eAYxhQz/D/36GDf1qAWYBQbLs5Cwu KVUREc5JFVx2Rmp4cqbCCnwv99iAeeCQHTA0kGwSbS9wxYoJqYrLVdgBpDFJoCgxcY0SpUhz b8iUmYnKbLmMswMB7ReSB4jYssKV0fO8Y+KE3COus/et9nQ9IWjPF2N1qJyLikyCD1TNkY4E vUh16+xB4dy1Js3xPWr/uKyxYzEucXUu2201XYwe2tx6kpsX1el6d3Fx7tDgyuWloByN6vCb P7S589yFhunPxlNJnclqS7rejYfFXwmI7oj68MtuOWOR4Fya9MBuTMlJ/wGtcY/L0AIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 27 Hello, On 02/14/2015 10:32 AM, Gioh Kim wrote: > 2015-02-13 ???? 7:15?? Stefan Strogin ??(??) ?? ??: >> From: Dmitry Safonov >> >> Here are two functions that provide interface to compute/get used size >> and size of biggest free chunk in cma region. > I usually just try to allocate memory, not check free size before try, > becuase free size can be changed after I check it. > > Could you tell me why biggest free chunk size is necessary? > It may have changed after checking - at beginning of allocation this information is completely useless as you mentioned, but it may be very helpful after failed allocation to detect fragmentation problem: i.e, you failed to alloc 20 Mb from 100 Mb CMA region with 60 Mb free space, so you will know the reason. -- Best regards, Safonov Dmitry. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/