All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org
Subject: Re: [RFC][PATCH] allow "unlimited" limit value.
Date: Tue, 25 Sep 2007 17:34:00 +0400	[thread overview]
Message-ID: <46F90E48.6080603@openvz.org> (raw)
In-Reply-To: <46F90DCA.5030209-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

Balbir Singh wrote:
> Pavel Emelyanov wrote:
>> Balbir Singh wrote:
>>> KAMEZAWA Hiroyuki wrote:
>>>> On Tue, 25 Sep 2007 16:19:18 +0530
>>>> Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
>>>>
>>>>> Hi, Kamezawa-San,
>>>>>
>>>> Hi,
>>>>
>>>>> 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
>>>> yes, maybe.
>>>>
>>>>> 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 :-)
>>>>>
>>>> Oh. res_counter.c  uses LONGLONG_MAX as default value.
>>>> need fix ? or intended ?
>>> Pavel do you remember why LONG was chosen instead of ULONG?
>> To prevent the overflow in "charge" routine.
>> See, if you add two numbers less than LONG_MAX, but with
>> unsigned long type each, you will never have an overflowed result.
>>
> 
> Aah.. Thanks, my memory short circuited on me.
> 
>>>> And okay there is no "unlimited" state.
>>>>
>>>>> 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?
>>>>>
>>>> I agree with you that perl/python script can hide details. but they need knowledge
>>>> about the maximum value, which is given as default value.
>>>>
>>>> In short, what I want is some value like RLIM_INFINITY in ulimit.
>>>>
>>> I like the idea of RLIM_INFINITY and how ulimit as a tool shows
>>> a value. I guess we need something like RES_COUNTER_LIMIT_MAX
>>> and the user tool can show the limit as maximum. We could also
>>> define a special number, RES_COUNTER_LIMIT_INFINITY, such that
>>> containers will not enforce limits when the limit is set to
>>> this value.
>>>
>>>> Because it seems that res_counter.c will be used for other resouce control purpose,
>>>> I thought some generic way (value) to know/specify "the maximum value" is helpful for
>>>> all resource controller interface.
>>>>
>>>> If there is an concensus that treaing ULONGLONG_MAX as default, it's ok.
>>>>
>>> When I worked on the first version of res_counters, I used 0 to indicate
>>> unlimited. When Pavel posted his version, I think derived from
>>> beancounters, we did not want to have unlimited containers, so he used
>>> the maximum value
>> Yup! Setting LONGMAX pages for container means that this container
>> is unlimited, since there're no such many pages on any arch :)
>>
> 
> Pavel, we no longer account in pages, we do it in bytes. Second,
> this assumption cannot hold for long, memory sizes are growing,
> I think we need a special value.

I see. And I also see that we've switched into unsigned long long.

Well, no container may have the ULLMAX (or what is it?) bytes
touched/allocated :) So I don't see any need in a special value.

> 
>>>> Thanks,
>>>> -Kame
>>>>
>>> Thanks for looking into this,
>>>
> 
> 

  parent reply	other threads:[~2007-09-25 13:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 10:39 [RFC][PATCH] allow "unlimited" limit value KAMEZAWA Hiroyuki
     [not found] ` <20070925193900.1af6d871.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-09-25 10:49   ` Balbir Singh
     [not found]     ` <46F8E7AE.2090309-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-09-25 11:29       ` KAMEZAWA Hiroyuki
     [not found]         ` <20070925202954.4e477564.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-09-25 11:54           ` Balbir Singh
     [not found]             ` <46F8F6FE.7040006-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-09-25 13:06               ` Pavel Emelyanov
     [not found]                 ` <46F907CE.1060807-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-25 13:31                   ` Balbir Singh
     [not found]                     ` <46F90DCA.5030209-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-09-25 13:34                       ` Pavel Emelyanov [this message]
     [not found]                         ` <46F90E48.6080603-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-25 15:05                           ` KAMEZAWA Hiroyuki
     [not found]                             ` <20070926000510.7d956db8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-09-25 15:14                               ` Pavel Emelyanov
     [not found]                                 ` <46F925ED.20303-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-25 15:30                                   ` KAMEZAWA Hiroyuki
     [not found]                                     ` <20070926003056.7df087a0.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-09-25 19:07                                       ` David Rientjes
     [not found]                                         ` <alpine.DEB.0.9999.0709251205390.19001-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2007-09-25 19:21                                           ` Balbir Singh
     [not found]                                             ` <46F95FD7.3010204-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-09-25 19:30                                               ` David Rientjes
2007-09-25 19:35                                               ` Paul Menage
     [not found]                                                 ` <6599ad830709251235u33dde9c8pfd56ed3d9d4fbe4b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-25 19:40                                                   ` David Rientjes
     [not found]                                                     ` <alpine.DEB.0.9999.0709251236040.23337-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2007-09-25 20:00                                                       ` Paul Menage
     [not found]                                                         ` <6599ad830709251300sea126bam5a4b6f7c6bd366e0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-25 20:07                                                           ` David Rientjes
     [not found]                                                             ` <alpine.DEB.0.9999.0709251304030.28350-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2007-09-25 20:12                                                               ` Paul Menage
     [not found]                                                                 ` <6599ad830709251312p7cdfae3byac2048fdc64ea5ca-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-25 20:32                                                                   ` David Rientjes
     [not found]                                                                     ` <alpine.DEB.0.9999.0709251325540.29575-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2007-09-25 20:40                                                                       ` Paul Menage
     [not found]                                                                         ` <6599ad830709251340t6e002dcbh6d7bcc6e6405739-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-25 20:58                                                                           ` David Rientjes
     [not found]                                                                             ` <alpine.DEB.0.9999.0709251346550.30668-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2007-09-26  0:06                                                                               ` Paul Menage
2007-09-26  1:23                                               ` KAMEZAWA Hiroyuki
     [not found]                                                 ` <20070926102343.0f700503.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-09-26  9:45                                                   ` Pavel Emelyanov
     [not found]                                                     ` <46FA2A4B.4040801-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-26 10:59                                                       ` Balbir Singh
     [not found]                                                         ` <46FA3B94.3080808-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-09-26 11:02                                                           ` Pavel Emelyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F90E48.6080603@openvz.org \
    --to=xemul-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.