[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd3added-1674-165a-0cfd-5e5841b738c7@kernel.dk>
Date: Wed, 21 Apr 2021 10:56:12 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Saravanan D <saravanand@...com>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: jkkm@...com, tj@...nel.org, kernel-team@...com,
Calvin Owens <calvinowens@...com>
Subject: Re: [PATCH] brd: expose number of allocated pages in debugfs
On 4/16/21 3:18 PM, Saravanan D wrote:
> From: Calvin Owens <calvinowens@...com>
>
> While the maximum size of each ramdisk is defined either
> as a module parameter, or compile time default, it's impossible
> to know how many pages have currently been allocated by each
> ram%d device, since they're allocated when used and never freed.
>
> This patch creates a new directory at this location:
>
> ยป /sys/kernel/debug/ramdisk_pages/
>
> ...which will contain a file named "ram%d" for each instantiated
> ramdisk on the system. The file is read-only, and read() will
> output the number of pages currently held by that ramdisk.
I folded in the justification and applied it for 5.13, thanks.
--
Jens Axboe
Powered by blists - more mailing lists