KAMEZAWA Hiroyuki wrote: > just for a RFC. > > When I use memory controller, I notice that memory.limit_in_bytes shows > just very big number, if unlimited. > > A user(or tool) has to know that the big number(LLONG_MAX) means "unlimted". > IMHO, some interface which allows users to specify "unlimited" value is helpful. > > This patch tries to define value RES_COUTNER_UNLIMITED (== LLONG_MAX) and > modifies an interface to support "unlimted" value. > > Because this patch breaks limit_in_bytes to some extent, > I'm glad if someone has a better idea to show unlimited value. > (if some easy value means "unlimited", it's helpful. LLONG_MAX is not easy > to be recognized.) > > ==after this patch == > [root@aworks kamezawa]# echo -n 400000000 > /opt/cgroup/memory.limit_in_bytes > [root@aworks kamezawa]# cat /opt/cgroup/memory.limit_in_bytes > 400003072 > [root@aworks kamezawa]# echo -n unlimited > /opt/cgroup/memory.limit_in_bytes > [root@aworks kamezawa]# cat /opt/cgroup/memory.limit_in_bytes > unlimited > Hi, Kamezawa-San, Your changes make sense, but not CLUI (Command Line Usage) sense. 1. The problem is that when we mix strings with numbers, tools that parse/use get confused and complicated 2. ULONGLONG_MAX is a real limit, there is no such thing as unlimited. If the user does ever go beyond ULONGLONG_MAX, we will limit him :-) Having said that, I do wish to have a more intuitive interface for users. May be a perl/python script to hide away the numbers game from the users. What do you think? -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers