From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH] tools: remove unused wrappers for python Date: Fri, 9 Oct 2015 06:42:08 +0200 Message-ID: <561745A0.9080207@suse.com> References: <1444128368-31585-1-git-send-email-jgross@suse.com> <20151006111849.GW29124@zion.uk.xensource.com> <5613B1A2.2030800@suse.com> <20151006113902.GY29124@zion.uk.xensource.com> <1444138837.5302.174.camel@citrix.com> <5613DFF9.6000309@suse.com> <5613E7B0.5020405@oracle.com> <1444315101.1410.211.camel@citrix.com> <56168747.6050109@oracle.com> <1444318021.1410.242.camel@citrix.com> <56169AAC.5000502@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56169AAC.5000502@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Zhigang Wang , Ian Campbell , Andrew Cooper Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, Wei Liu , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 10/08/2015 06:32 PM, Zhigang Wang wrote: > On 10/08/2015 11:27 AM, Ian Campbell wrote: >> On Thu, 2015-10-08 at 11:09 -0400, Zhigang Wang wrote: >>> On 10/08/2015 10:38 AM, Ian Campbell wrote: >>>> On Tue, 2015-10-06 at 11:24 -0400, Zhigang Wang wrote: >>>>> We use these extentions along with xend XMLRPC API/xm. Even when move >>>>> to >>>>> xl, this will give us a choice to reserve some logic. >>>> >>>> There are a lot of interfaces here, are you using all of them? If not >>>> then >>>> could you enumerate the ones you care about please. >>> >>> Currently we are using: >>> >>> xc.getcpuinfo() >>> xc.domain_getinfo() >> >> Thanks. >> >>> But after switching to xl, we cannot get info from xend any more, then some of >>> these interfaces may be helpful. >> >> Do you have any insight into what info you currently get from xend which >> you don't think you can get from xl? >> >> It may be that there are gaps in the xl functionality which should be >> filled, rather than keeping the Python xc bindings around (equally there >> may be things where those bindings are the best solution). > > We mainly use these APIs for domain statistics, like: > > ============================ ===== ==== =================================== > Statistic Type Unit Note > ============================ ===== ==== =================================== > cpuMap int VM vcpus to physical cpus map list. > cpuTime float Sec VM accumulated CPU time. > cpuUtil float VM CPU average utilization. > Range: 0.0 - 1.0. > currentMemory long MiB VM current memory. > domainId int VM domain ID. > ephemeralTranscendentMemory long MiB VM Ephemeral tmem. > maxMemory long MiB VM maximum memory. > onlineVcpus int VM online VCPUs. > persistentTranscendentMemory long MiB VM persistent tmem. > targetMemory long MiB VM target memory. > ============================ ===== ==== =================================== > > I have a POC implementation of these statistics using xl, the only needed APIs are: > > xc.getcpuinfo() > xc.domain_getinfo() > xc.tmem_control() > > I haven't checked whether xl CLI has alternatives for all of these. These xc APIs > seem fit our need. Okay, so there are confirmed users of: xc.getcpuinfo() xc.domain_getinfo() xc.tmem_control() and no known users of: xc.domain_create() xc.domain_max_vcpus() xc.domain_dumpcore() xc.domain_pause() xc.domain_unpause() xc.domain_destroy() xc.domain_destroy_hook() xc.domain_resume() xc.domain_shutdown() xc.vcpu_setaffinity() xc.domain_sethandle() xc.vcpu_getinfo() xc.linux_build() xc.getBitSize() xc.gnttab_hvm_seed() xc.hvm_get_param() xc.hvm_set_param() xc.get_device_group() xc.test_assign_device() xc.assign_device() xc.deassign_device() xc.sched_id_get() xc.sched_credit_domain_set() xc.sched_credit_domain_get() xc.sched_credit2_domain_set() xc.sched_credit2_domain_get() xc.evtchn_alloc_unbound() xc.evtchn_reset() xc.physdev_map_pirq() xc.physdev_pci_access_modify() xc.readconsolering() xc.physinfo() xc.topologyinfo() xc.numainfo() xc.xeninfo() xc.shadow_control() xc.shadow_mem_control() xc.domain_setmaxmem() xc.domain_set_target_mem() xc.domain_set_memmap_limit() xc.domain_ioport_permission() xc.domain_irq_permission() xc.domain_iomem_permission() xc.pages_to_kib() xc.domain_set_time_offset() xc.domain_set_tsc_info() xc.domain_disable_migrate() xc.domain_send_trigger() xc.send_debug_keys() xc.domain_check_cpuid() xc.domain_set_cpuid() xc.domain_set_policy_cpuid() xc.domain_set_machine_address_size() xc.domain_suppress_spurious_page_faults() xc.tmem_shared_auth() xc.dom_set_memshr() xc.cpupool_create() xc.cpupool_destroy() xc.cpupool_getinfo() xc.cpupool_addcpu() xc.cpupool_removecpu() xc.cpupool_movedomain() xc.cpupool_freeinfo() xc.flask_context_to_sid() xc.flask_sid_to_context() xc.flask_load() xc.flask_getenforce() xc.flask_setenforce() xc.flask_access() Andrew, which of those does your xen_bugtool use? Is it okay to remove all of the unused bindings? Juergen