All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: loop in copy_user_generic_string
Date: Tue, 04 Mar 2008 18:07:59 +0200	[thread overview]
Message-ID: <47CD73DF.6070502@qumranet.com> (raw)
In-Reply-To: <c4e36d110803040802o54afe4eavc56b772d7d82173f@mail.gmail.com>

Zdenek Kabelac wrote:
> Hello
>
>
> I'm having weird problem and being a bit puzzled about where to look
> for this bug.
>
> I'm using T61 - C2D  2GB
>
> So I'll describe symptoms:
>
> When I run inside my 0.5G smp  qemu-kvm guest with Debian these two
> loops in parallel:
>
> 'while : ; do dmsetup status  ; done'
>
> and
>
> 'while : ; do cat /dev/zero >/dev/mapper/any_free_to_use_lvm_partition ; done'
>
> after a while dmsetup start to loop in this place:
>
> [  356.257323]  [<ffffffff8117c017>] ? copy_user_generic_string+0x17/0x40
>
>
> I'm using preemptible kernel and the code will stay in the
> copy_user_generic_string call forever eating 100%cpu - without
> preemption the kernel gets dead.
>
> With preemption when I run at this moment second dmsetup status in
> paralllel the busy-looped dmsetup gets finished and while loop starts
> to continue agains until next dmsetup busy-loop.
>
> I've noticed that if I change inside  drivers/md/dm-ioctl.c
> copy_params  the parameter tmp.data_size in the copy_from_user call to
> just page size (4kB) - or when I replace vmalloc to kmalloc - the busy
> loop will not happen.
>
> So it seems to be related to page jump somehow
>
> Anyway might have any idea - what is going on here ?
>   

Most likely movs emulation is broken for long counts.  Please post a 
disassembly of copy_user_generic_string to make sure we're looking at 
the same code.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-03-04 16:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 16:02 loop in copy_user_generic_string Zdenek Kabelac
2008-03-04 16:07 ` Avi Kivity [this message]
2008-03-04 16:39   ` Zdenek Kabelac
2008-03-04 17:10     ` Avi Kivity
2008-03-04 17:44   ` Andi Kleen
2008-03-05  6:50     ` Avi Kivity
2008-03-05  8:52       ` Zdenek Kabelac
2008-03-07 19:32         ` Zdenek Kabelac
2008-03-09 22:13           ` Zdenek Kabelac
2008-03-11 22:19             ` Zdenek Kabelac
2008-03-12 12:50               ` Zdenek Kabelac
2008-03-12 14:40                 ` Andi Kleen
2008-03-12 15:49                   ` Zdenek Kabelac
2008-03-12 16:08                     ` Zdenek Kabelac

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=47CD73DF.6070502@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=zdenek.kabelac@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.