From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by kanga.kvack.org (Postfix) with ESMTP id 9EB3F6B0038 for ; Mon, 2 Mar 2015 15:42:34 -0500 (EST) Received: by wibbs8 with SMTP id bs8so17926525wib.4 for ; Mon, 02 Mar 2015 12:42:34 -0800 (PST) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com. [2a00:1450:400c:c03::22f]) by mx.google.com with ESMTPS id mb10si20532799wic.0.2015.03.02.12.42.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2015 12:42:33 -0800 (PST) Received: by wevl61 with SMTP id l61so35849180wev.2 for ; Mon, 02 Mar 2015 12:42:32 -0800 (PST) From: Michal Nazarewicz Subject: Re: [PATCH v3 3/4] mm: cma: add list of currently allocated CMA buffers to debugfs In-Reply-To: <54F48560.1090800@partner.samsung.com> References: <1fe64ae6f12eeda1c2aa59daea7f89e57e0e35a9.1424802755.git.s.strogin@partner.samsung.com> <54F48560.1090800@partner.samsung.com> Date: Mon, 02 Mar 2015 21:42:28 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Stefan Strogin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Joonsoo Kim , Andrew Morton , Marek Szyprowski , aneesh.kumar@linux.vnet.ibm.com, Laurent Pinchart , Dmitry Safonov , Pintu Kumar , Weijie Yang , Laura Abbott , SeongJae Park , Hui Zhu , Minchan Kim , Dyasly Sergey , Vyacheslav Tyrtov , Aleksei Mateosian , gregory.0xf0@gmail.com, sasha.levin@oracle.com, gioh.kim@lge.com, pavel@ucw.cz, stefan.strogin@gmail.com On Mon, Mar 02 2015, Stefan Strogin wrote: > My fault. You are right. > I'm not sure how to do the output nice... I could use *ppos to point the > number of next list entry to read (like that is used in > read_page_owner()). But in this case the list could be changed before we > finish reading, it's bad. > Or we could use seq_files like in v1, iterating over buffer_list > entries. But seq_print_stack_trace() has to be added. I=E2=80=99m not that familiar with seq_* so my opinion may be ill-informed,= but I feel that skipping some entries while (de)allocations happen is akin to process reading a file while some other process modifies it. This is a debug function so perhaps it=E2=80=99s acceptable that it may return garb= age if not used carefully? --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------ooO--(_)--Ooo-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org