Re: [PATCH 4/5] mm: shmem: Convert shmem_enabled_show to use sysfs_emit_at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 02, 2020 at 02:33:43PM +0100, Greg Kroah-Hartman wrote:
> > Oh, ugh, sysfs_emit() should be able to work on a buffer that isn't
> > page aligned.  Greg, how about this?
> 
> How can sysfs_emit() be called on a non-page-aligned buffer?  It's being
> used on the buffer that was passed to the sysfs call.
> 
> And if you are writing multiple values to a single sysfs file output,
> well, not good...

See shmem_enabled_show() in mm/shmem.c (output at
/sys/kernel/mm/transparent_hugepage/shmem_enabled on your machine).

I don't claim it's a good interface, but it exists.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux