From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "He, Qing" <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [RFC] lapic3: cleanup for save/restore data structure of in-kernel irqchips
Date: Fri, 03 Aug 2007 17:57:41 +0300 [thread overview]
Message-ID: <46B34265.1040307@qumranet.com> (raw)
In-Reply-To: <37E52D09333DE2469A03574C88DBF40F048EDA-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2345 bytes --]
He, Qing wrote:
>
>> -----Original Message-----
>> From: Avi Kivity [mailto:avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org]
>> Sent: 2007年8月2日 19:58
>> To: He, Qing
>> Cc: kvm-devel
>> Subject: Re: [kvm-devel] [RFC] lapic3: cleanup for save/restore data structure of
>> in-kernel irqchips
>>
>> He, Qing wrote:
>>
>>> Hi,
>>> The argument of in-kernel irqchip save/restore IOCTL uses a
>>> separate data structure (struct kvm_irqchip and struct kvm_ioctl_pic in
>>> include/linux/kvm.h) different from functional data structure (struct
>>> kvm_pic_state and struct kvm_ioapic in driver/kvm/irq.h), this is
>>> because while most data are used at both side, there are certain
>>> internal data in functional data structure which should not be exposed
>>> to the user.
>>> Current code has some duplication between these two, and these
>>> duplicated parts are copied back and forth when save and restore. This
>>> seems a maintenance pain.
>>>
>>>
>> I'm not sure consolidating helps with maintenance in this case:
>>
>> - if there are no changes, there is no maintenance.
>>
>
> Well, I don't think we can safely presume the code will never change. For example, maybe someone wants to make IOAPIC redir table count dynamically configurable, or consolidate IOSAPIC support into current IOAPIC code, etc. In these cases, the duplicated data structure is capable to become a trap.
> Furthermore, even if there is no maintenance concern, these codes are still not elegant enough.
>
The point is, if we de-duplicate the structure now, we'll have to
re-duplicate it when it changes, because we'll have to maintain
compatibility.
>
>> - if we change the kernel side, we can't change the userspace interface
>> side because it will break existing code. we have to write a new data
>> structure for the interface and maintain the new and the old in parallel.
>>
>
> I don't see your concern here. The whole lapic3 is work in progress, isn't it? Why should we maintain an `old' interface? Also, as in the second patch, no userspace change is required.
>
I was thinking about maintenance post 2.6.24.
However, I'm not opposed to the second patch -- if you think it
worthwhile, it can go in.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
next prev parent reply other threads:[~2007-08-03 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 11:47 [RFC] lapic3: cleanup for save/restore data structure of in-kernel irqchips He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40F048ED1-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-02 11:58 ` Avi Kivity
[not found] ` <46B1C6E1.2050508-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-03 2:55 ` He, Qing
[not found] ` <37E52D09333DE2469A03574C88DBF40F048EDA-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-03 14:57 ` Avi Kivity [this message]
[not found] ` <46B34265.1040307-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-04 1:34 ` Dong, Eddie
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=46B34265.1040307@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=qing.he-ral2JQCrhuEAvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox