<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
>

  <channel rdf:about="http://lwn.net/headlines/197433/">
    <title>LWN: Comments on "Resource beancounters"</title>
    <link>http://lwn.net/Articles/197433/</link>
    <description>
This is a special feed containing comments posted
to the individual LWN article titled &quot;Resource beancounters&quot;.

    </description>

    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>2</syn:updateFrequency>
    <items>
      <rdf:Seq>
	<rdf:li resource="http://lwn.net/Articles/199764/rss" />
	<rdf:li resource="http://lwn.net/Articles/199763/rss" />
	<rdf:li resource="http://lwn.net/Articles/198565/rss" />
	<rdf:li resource="http://lwn.net/Articles/197866/rss" />
	<rdf:li resource="http://lwn.net/Articles/197703/rss" />
      
      </rdf:Seq>
    </items>

  </channel>
    <item rdf:about="http://lwn.net/Articles/199764/rss">
      <title>Resource beancounters</title>
      <link>http://lwn.net/Articles/199764/rss</link>
      <dc:date>2006-09-16T06:50:50+00:00</dc:date>
      <dc:creator>devx</dc:creator>
      <description>
      &lt;font class=&quot;QuotedText&quot;&gt;&amp;gt;&amp;gt; There are some concerns about how accounting for shared resources is &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt;&amp;gt; handled - does the process group which first faults in the C library get  &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt;&amp;gt; charged for the whole thing, giving others a free ride? &lt;/font&gt;&lt;br&gt;
FYI: BC accounting of user memory takes into account _fractions_ of pages. i.e. if 2 users share the same glibc and map the same page into its address space, then both will be charged 1/2 of the page.&lt;br&gt;
&lt;p&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; The few times I've tried to resolve the kernel memory accounting problem,&lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; I've had to quit because most of the resource is shared.&lt;/font&gt;&lt;br&gt;
First, BC accounts only that kernel memory which is user triggerable. i.e. allocated on demand. This is required to prevent DoS. And it is not quite clear how and to whom charge all the other memory allocations, so this looks reasonably enough. e.g. whom should we charge memory allocated by interrupts?&lt;br&gt;
Second, there can be different polices on how to account shared resources. Usually it is handled as &quot;charge to the creator&quot;.&lt;br&gt;
&lt;p&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; Also, kernel code usually can't tolerate having no memory available to&lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; it. The only reason the kernel works at all today is that things are&lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; done to make it unlikely that there isn't a single page of memory &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; available; but with local limits like this, it would happen a lot.&lt;/font&gt;&lt;br&gt;
This is not 100% true.&lt;br&gt;
Well, at least if we consider the objects which are allocated on user request. One of OpenVZ stress tests is to run 100 VPSs with random BC limits. These triggers different error paths in kernel and we submit patches to mainstream in case of problems. So this works quite stable and tested.&lt;br&gt;
&lt;p&gt;
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/199763/rss">
      <title>Resource beancounters</title>
      <link>http://lwn.net/Articles/199763/rss</link>
      <dc:date>2006-09-16T06:41:23+00:00</dc:date>
      <dc:creator>devx</dc:creator>
      <description>
      There is a small misunderstanding. Beancounters have nothing to do with tasks directly and don't do task groupping.&lt;br&gt;
Look, there are a lot of resources which can be shared: pages, IPCs, files etc. Task groupping doesn't help anyhow since the same file can belong to 2 different tasks in 2 different resource groups.&lt;br&gt;
So tasks if accounted are just the same kind of abstract objects just like any other are (files, sockets, ...).&lt;br&gt;
&lt;p&gt;
And beancounters do not track and do not have a list of the objects.&lt;br&gt;
Instead, beancounters do:&lt;br&gt;
- accounting&lt;br&gt;
- limiting&lt;br&gt;
- beancounters are referenced to _by_ all the charged objects (not otherwise) to make uncharging correct (objects freeing can be done in arbitrary context).&lt;br&gt;
&lt;p&gt;
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/198565/rss">
      <title>Resource beancounters</title>
      <link>http://lwn.net/Articles/198565/rss</link>
      <dc:date>2006-09-07T00:46:25+00:00</dc:date>
      <dc:creator>mtrob</dc:creator>
      <description>
      Hmmm, I've been using this system for many years now in Linux.  The product is Virtuozzo from SW Soft who recently put Open VZ out there for the kernel folks to work with.  By the way, it works exceedingly well.  And for a situation where you can use a common kernel virtualization (para-virtualization) it just beats the pants off VMWare and Xen.&lt;br&gt;
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/197866/rss">
      <title>Resource beancounters</title>
      <link>http://lwn.net/Articles/197866/rss</link>
      <dc:date>2006-08-31T22:32:46+00:00</dc:date>
      <dc:creator>giraffedata</dc:creator>
      <description>
      &lt;blockquote&gt;
There are some concerns about how accounting for shared resources is handled - does the process group which first faults in the C library get charged for the whole thing, giving others a free ride?
&lt;/blockquote&gt;
&lt;p&gt;
The few times I've tried to resolve the kernel memory accounting problem, I've had to quit because &lt;em&gt;most&lt;/em&gt; of the resource is shared.

&lt;p&gt;Also, kernel code usually can't tolerate having no memory available to it.  The only reason the kernel works at all today is that things are done to make it unlikely that there isn't a single page of memory available; but with local limits like this, it would happen a lot.

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/197703/rss">
      <title>Resource beancounters</title>
      <link>http://lwn.net/Articles/197703/rss</link>
      <dc:date>2006-08-31T14:28:09+00:00</dc:date>
      <dc:creator>utoddl</dc:creator>
      <description>
      Wow.  They've reinvented another flavor of process groups. Kind of like the old AFS PAG, but it tracks resource allocations instead of tracking authentication tokens. And then there's the keyring based implementation of process authentication groups that OpenAFS is moving toward and that NFSv4+ (and any other externally hosted authenticated resource) is going to need. I'm sure there are others. How many different ways of grouping processes do we need, and does some of this code overlap?
      
      </description>
    </item>
</rdf:RDF>

