Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "\"Zhou, Wenjian/周文剑\"" <zhouwj-fnst@cn.fujitsu.com>
To: Minoru Usui <min-usui@ti.jp.nec.com>
Cc: Minfei Huang <mhuang@redhat.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH v3] Improve the performance of --num-threads -d 31
Date: Mon, 7 Mar 2016 17:03:51 +0800	[thread overview]
Message-ID: <56DD43F7.8060703@cn.fujitsu.com> (raw)
In-Reply-To: <BE691E4CBA06214BB0FA8EEFC7C61A4D0181E6B9@BPXM02GP.gisp.nec.co.jp>

Hi Minoru,

I guess if you change the part of locking page_data_buf to the following,
it will be more correct.
But I'm not sure if you will get the same problem as which in my patch v3.

+		pthread_mutex_lock(&info->page_data_mutex);
+		while (page_data_buf[index].used != FALSE) {
+			index = (index + 1) % info->num_buffers;
+		}
+		page_data_buf[index].used = TRUE;
+		pthread_mutex_unlock(&info->page_data_mutex);

-- 
Thanks
Zhou

On 03/07/2016 04:52 PM, Minoru Usui wrote:
> Hi, Zhou
>
>> -----Original Message-----
>> From: kexec [mailto:kexec-bounces@lists.infradead.org] On Behalf Of "Zhou, Wenjian/周文?"
>> Sent: Monday, March 07, 2016 5:43 PM
>> To: Usui Minoru(碓井 成) <min-usui@ti.jp.nec.com>
>> Cc: Minfei Huang <mhuang@redhat.com>; kexec@lists.infradead.org
>> Subject: Re: [PATCH v3] Improve the performance of --num-threads -d 31
>>
>> Hi Minoru,
>>
>> I got two error dumpfiles by running it less than 100 times.
>
> Oh, I'm sorry.
> Thank you for your test.
>
> I'm waiting for your v4 patch.
>
> Thanks
> Minoru Usui
>
>
>
>> --
>> Thanks
>> Zhou
>>
>> On 03/07/2016 04:22 PM, "Zhou, Wenjian/周文?" wrote:
>>> Hi Minoru,
>>>
>>> I have test your patch since you post.
>>> I can get a failure easily.
>>> If you run it several times, the dumpfile it produces may be different from the correct one.
>>>
>>> +			info->current_pfn = pfn + 1;
>>> +			pthread_mutex_unlock(&info->current_pfn_mutex);
>>> +			page_flag_buf->pfn = pfn;
>>> +			page_flag_buf->ready = FLAG_FILLING;
>>> The above code should be changed to the following:
>>>
>>> +			info->current_pfn = pfn + 1;
>>> +			page_flag_buf->pfn = pfn;
>>> +			page_flag_buf->ready = FLAG_FILLING;
>>> +			pthread_mutex_unlock(&info->current_pfn_mutex);
>>>
>>> I haven't run your code with the bug fixed.
>>> I'll try now.
>>>
>>> By the way, with my patch v3, I can't get an error dumpfile until run it by 5000 times.
>>
>>
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec




_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2016-03-07  9:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04  8:35 [PATCH v3] Improve the performance of --num-threads -d 31 Zhou Wenjian
2016-03-04  9:07 ` "Zhou, Wenjian/周文剑"
2016-03-07  0:17   ` "Zhou, Wenjian/周文剑"
2016-03-07  5:53     ` Minfei Huang
2016-03-07  7:04 ` Minfei Huang
2016-03-07  7:36   ` Minoru Usui
2016-03-07  8:16     ` Minoru Usui
2016-03-07  8:39       ` Minfei Huang
2016-03-07  8:46         ` "Zhou, Wenjian/周文剑"
2016-03-07  8:22     ` "Zhou, Wenjian/周文?"
2016-03-07  8:43       ` "Zhou, Wenjian/周文剑"
2016-03-07  8:52         ` Minoru Usui
2016-03-07  9:03           ` "Zhou, Wenjian/周文剑" [this message]

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=56DD43F7.8060703@cn.fujitsu.com \
    --to=zhouwj-fnst@cn.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=mhuang@redhat.com \
    --cc=min-usui@ti.jp.nec.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox