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

Re: [Xen-devel] [PATCH 3/3] Xen physical cpus interface



Liu, Jinsong wrote:
> Just notice your reply (so quick :)
> 
> Agree and will update later, except 1 concern below.
> 
> Konrad Rzeszutek Wilk wrote:
>>> 
>>> Hmm, it's good if it's convenient to do it automatically via
>>> dev->release. However, dev container (pcpu) would be free at some
>>> other error cases, so I prefer do it 'manually'.
>> 
>> You could also call pcpu_release(..) to do it manually.
>> 
> 
> that means kfree(pcpu) would be done twice at some error cases, do
> you think it really good? 
> 

Ping.

I think error recovery should be kept inside error logic level itself, if try 
to recover upper level error would bring trouble.

In our example, there are 2 logic levels:
pcpu level (as container), and dev level (subfield used for sys)
dev->release should only recover error occurred at dev/sys level, and the pcpu 
error should be recovered at pcpu level.

If dev->release try to recover its container pcpu level error, like 
list_del/kfree(pcpu), it would make confusing. i.e., considering 
pcpu_sys_create(), 2 error cases:
device_register fail, and device_create_file fail --> how can the caller decide 
kfree(pcpu) or not?

So how about recover pcpu error manually and explicitly?

Thanks,
Jinsong
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.