Re: [PATCH] Expose SHM_HUGETLB in shmctl(id, IPC_STAT, ...)

From: Arun Sharma
Date: Thu Nov 10 2005 - 16:41:43 EST


Andrew Morton wrote:

The man page on my system says:

unsigned short mode; /* Permissions + SHM_DEST and
SHM_LOCKED flags */

I looked for a precendent before sending the patch and thought that SHM_LOCKED was a good one.



hm, OK. But an app could still do

if (mode == 0666|SHM_LOCKED)


I'd argue that the app should really be doing (perm.mode & 0777 = 0666)


How important is this feature?

Without this feature, an application has no way to figure out if a given segment is hugetlb or not. Applications need to know this to be able to handle alignment issues properly.

Also, if the flag is exported via ipcs, the system administrator would have a better idea about how the hugetlb pages she configured on the system are getting used.

-Arun
-
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/