Re: OptimizationKit 0.1.2-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2008, Optimization Kit <optimizationkit@xxxxxxxxx> wrote:
> Hi Balbir,
>
>
>  On 06/04/2008, Balbir Singh <bsingharora@xxxxxxxxx> wrote:
>  > Hi, Michal,
>  >
>  >  We are trying to do something similar with libcg.
>
>
> Yes, I know.
>
>
>  > We do provide
>  >  configuration files and configuration and an API to program control
>  >  groups (cgroups). Please see http://libcg.sf.net.  Is there a reason
>  >  why a C API or programming interface is not provided in Optimization
>  >  Kit?
>

Sorry, I misunderstand you. (After a few hours of coding my brain
hurts http://youtube.com/watch?v=IIlKiRPSNGA ;))

ok_cg is a very simple library that contains 6 function:
setup_cgroups(cpu_exclusive, mem_exclusive, features, cgroup_mount_dir)
create_groups_from_config(config, cgroup_mount_dir)
create_cgroup(cgroup, cgroup_mount_dir)
change_default_cgroup_opts(cgroup, opts, cgroup_mount_dir)
add_tasks_to_cgroup(cgroup, args, pgrep_args, cgroup_mount_dir)
get_pids(arg, pgrep_args)

providing an interface for python functions in c, c++ etc is quite simple
http://elmer.sourceforge.net/

The problem is that these functions requires a bit complicated data structures

for example:

[['games', '10', 'NULL', 'NULL', 'NULL', 'NULL',
{'cpuset.memory_spread_page': '0', 'cpuset.memory_spread_slab': '0',
'cpuset.mems': '0', 'cpuset.mem_exclusive': '0',
'cpuset.cpu_exclusive': '0', 'notify_on_release': '0',
'cpuset.memory_pressure': '0', 'cpuset.memory_pressure_enabled': '0',
'cpuset.sched_load_balance': '1', 'cfq.ioprio': '0',
'cpuset.memory_migrate': '0', 'cpuset.cpus': '0',
'memory.limit_in_bytes': 'NULL'}, ['michal'], ['michal'],
['mc','firefox-bin']]]

I'm not sure if it's possible to create a simple interface between C
and Python in such case.

Regards,
Michal

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux