Skip to contentSkip to conversation

domain setmaxmen in KB or bytes?

DISCUSSION Jacob Gorm Hansen 1 participant 1 message Dec 27, 2004

lore
Share & tools
lore
#0 lore raw

hi,

the maxmem parameter to DOM0_SETDOMAINMAXMEM is called max_memkb, indicating that it should be in kilobytes, but looking at the code in xen/common/dom0_ops.c:

    case DOM0_SETDOMAINMAXMEM:
    {
        struct domain *d;
        ret = -ESRCH;
        d = find_domain_by_id( op->u.setdomainmaxmem.domain );
        if ( d != NULL )
        {
            d->max_pages =
                (op->u.setdomainmaxmem.max_memkb+PAGE_SIZE-1)>> PAGE_SHIFT;
            put_domain(d);
            ret = 0;
        }
    }
    break;

It seems the value is treated as being in bytes? Bug or feature?

best,
Jacob

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/