Re: [uml-devel] hostfs oddities

2008-07-09 Thread Ingo van Lil
Jeff Dike schrieb:

>> I guess this is some kind of caching effect, because strace shows that 
>> there is only a single read to the actual physical file. Maybe hostfs 
>> should check whether the outside file has changed and invalidate the 
>> cache if necessary.
> 
> Correct.  I've pondered using [id]notify to track changes on the host
> and either invalidate the UML cache or update it.  Both involve
> interactions with the page cache that I'm not entirely comfortable
> with right now.

I gave all this a little more thought: The ideal solution would be to 
somehow share the host's page cache for that file. That way concurrent 
read and write accesses on both sides would be automatically 
synchronized, just as when multiple regular processes access the same 
file. I guess that's not easily possible, is it?

If it turns out we have to invalidate the cache whenever the file is 
changed on the host side it looks like invalidate_inode_pages2() is the 
function to use: If I modify the aio_read in hostfs_kern.c to call this 
function on iocb->ki_filp->f_mapping before every read changes made on 
the host become immediately visible on the guest. This is also what nfs 
seems to do.

Regards,
Ingo

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


Re: [uml-devel] 2.6.25 uml kernel crashes when it calls down() on a semaphore with zero counter

2008-07-09 Thread Jiaying Zhang
Hi Jeff,

Do you have any thought about what the problem might be?
Thanks a lot!

Jiaying

On Fri, Jul 4, 2008 at 9:06 AM, Jiaying Zhang <[EMAIL PROTECTED]> wrote:

> The stack trace isn't very helpful. Here it is.
>
> EIP: 0073:[] CPU: 0 Not tainted ESP: 007b:0be3ea78 EFLAGS:
> 00210206
> Not tainted
> EAX: 0be548d8 EBX: 08325b54 ECX: 08325b58 EDX: 0be548cc
> ESI: 0001 EDI: 080598c6 EBP: 0be3ea98 DS: 007b ES: 007b
> 08323b6c:  [<0806a718>] show_regs+0xc4/0xc9
> 08323b98:  [<080594b3>] segv+0x20e/0x226
> 08323c3c:  [<080592a0>] segv_handler+0x4f/0x54
> 08323c5c:  [<0806537b>] sig_handler_common+0x63/0x72
> 08323cd4:  [<080653b8>] sig_handler+0x2e/0x3e
> 08323cec:  [<080654dd>] handle_signal+0x4d/0x7a
> 08323d0c:  [<08066ebf>] hard_handler+0xf/0x14
> 08323d1c:  [] 0xb7fff420
>
> Kernel panic - not syncing: Kernel mode fault at addr 0xd84156c5, ip
> 0xd84156c5
>
> EIP: 0073:[<40146334>] CPU: 0 Not tainted ESP: 007b:bfaf2378 EFLAGS:
> 00200246
> Not tainted
> EAX: ffda EBX: 0003 ECX: c134fd09 EDX: 08050368
> ESI: 4002b7c0 EDI: 40029180 EBP: bfaf24c8 DS: 007b ES: 007b
> 08323ad8:  [<0806a718>] show_regs+0xc4/0xc9
> 08323b04:  [<080596ed>] panic_exit+0x23/0x39
> 08323b18:  [<080849d0>] notifier_call_chain+0x21/0x4d
> 08323b38:  [<08084a72>] __atomic_notifier_call_chain+0x17/0x19
> 08323b54:  [<08084a89>] atomic_notifier_call_chain+0x15/0x17
> 08323b70:  [<0807116f>] panic+0x4f/0xd1
> 08323b8c:  [<080594c1>] segv+0x21c/0x226
> 08323c3c:  [<080592a0>] segv_handler+0x4f/0x54
> 08323c5c:  [<0806537b>] sig_handler_common+0x63/0x72
> 08323cd4:  [<080653b8>] sig_handler+0x2e/0x3e
> 08323cec:  [<080654dd>] handle_signal+0x4d/0x7a
> 08323d0c:  [<08066ebf>] hard_handler+0xf/0x14
> 08323d1c:  [] 0xb7fff420
>
> Segmentation fault
>
> Jiaying
>
>
> On Thu, Jul 3, 2008 at 9:56 PM, Jeff Dike <[EMAIL PROTECTED]> wrote:
>
>> On Thu, Jul 03, 2008 at 12:53:46AM -0700, Jiaying Zhang wrote:
>> > I found since 2.6.25 kernels, uml crashes when it calls down() on a
>> > semaphore with
>> > zero counter.
>>
>> What's the stack trace?
>>
>> Can you bisect it?
>>
>>Jeff
>>
>> --
>> Work email - jdike at linux dot intel dot com
>>
>
>
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel