Re: [PATCH v3 3/4] mm: cma: add list of currently allocated CMA buffers to debugfs

From: Michal Nazarewicz
Date: Mon Mar 02 2015 - 15:42:39 EST


On Mon, Mar 02 2015, Stefan Strogin <s.strogin@xxxxxxxxxxxxxxxxxxx> 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âm 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âs acceptable that it may return garbage
if not used carefully?

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, MichaÅ âmina86â Nazarewicz (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/