All of lore.kernel.org
 help / color / mirror / Atom feed
* About thread_local and TmapMigratePP.DataScan case
@ 2016-06-27 18:04 Haomai Wang
  2016-06-28  9:45 ` John Spray
  2016-06-30  2:13 ` Yan, Zheng
  0 siblings, 2 replies; 4+ messages in thread
From: Haomai Wang @ 2016-06-27 18:04 UTC (permalink / raw)
  To: ceph-devel

Hi all,

anyone who knows what's the special thing with TmapMigratePP.DataScan
case. When I introduce thread_local variable in
PR(https://github.com/ceph/ceph/pull/9783/files#diff-254a8401d238ec25c714a5596f85b5ebL64),
it always failed because the thread local variable is assigned to zero
when execute this test!

For example, when tid == 512596224 local_center should be 5fed4e48,
but after begin this test case, this thread_local variable is assigned
to zero!:
tid=-512596224 local_center=5fed4e48 this=5fed4e48
[New Thread 0x7fffdef21700 (LWP 11835)]
tid=-512596224 local_center=5fed4e48 this=5fed4e48
[New Thread 0x7fffde720700 (LWP 11836)]
[New Thread 0x7fffddf1f700 (LWP 11837)]
[New Thread 0x7fffdd71e700 (LWP 11838)]
[New Thread 0x7fffdcf1d700 (LWP 11839)]
[New Thread 0x7fffdc71c700 (LWP 11840)]
[New Thread 0x7fffdbf1b700 (LWP 11841)]
tid=-134366272 local_center=0 this=5fed4e48
tid=-134366272 local_center=0 this=5fed4e48
tid=-134366272 local_center=0 this=5fed4e48
tid=-512596224 local_center=0 this=5fed4e48


QA job:http://qa-proxy.ceph.com/teuthology/haomai-2016-06-27_03:55:04-rados-wip-haomai-testing---basic-smithi/279412/teuthology.log

This can be repeated locally and I want to know what's the difference
this case introduced

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About thread_local and TmapMigratePP.DataScan case
  2016-06-27 18:04 About thread_local and TmapMigratePP.DataScan case Haomai Wang
@ 2016-06-28  9:45 ` John Spray
  2016-06-30  2:13 ` Yan, Zheng
  1 sibling, 0 replies; 4+ messages in thread
From: John Spray @ 2016-06-28  9:45 UTC (permalink / raw)
  To: Haomai Wang; +Cc: ceph-devel

On Mon, Jun 27, 2016 at 7:04 PM, Haomai Wang <haomai@xsky.com> wrote:
> Hi all,
>
> anyone who knows what's the special thing with TmapMigratePP.DataScan
> case. When I introduce thread_local variable in
> PR(https://github.com/ceph/ceph/pull/9783/files#diff-254a8401d238ec25c714a5596f85b5ebL64),
> it always failed because the thread local variable is assigned to zero
> when execute this test!

I don't know off the top of my head, but that particular piece of
functionality (tmap migrate in DataScan) is intended to be removed for
Kraken, so if your code won't need backporting to Jewel then we can
just remove the test.

John

(This is the code that we put in Jewel to enable people to migrate
their TMAP directory fragments to OMAP fully before we remove TMAP
support in Kraken)

> For example, when tid == 512596224 local_center should be 5fed4e48,
> but after begin this test case, this thread_local variable is assigned
> to zero!:
> tid=-512596224 local_center=5fed4e48 this=5fed4e48
> [New Thread 0x7fffdef21700 (LWP 11835)]
> tid=-512596224 local_center=5fed4e48 this=5fed4e48
> [New Thread 0x7fffde720700 (LWP 11836)]
> [New Thread 0x7fffddf1f700 (LWP 11837)]
> [New Thread 0x7fffdd71e700 (LWP 11838)]
> [New Thread 0x7fffdcf1d700 (LWP 11839)]
> [New Thread 0x7fffdc71c700 (LWP 11840)]
> [New Thread 0x7fffdbf1b700 (LWP 11841)]
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-512596224 local_center=0 this=5fed4e48
>
>
> QA job:http://qa-proxy.ceph.com/teuthology/haomai-2016-06-27_03:55:04-rados-wip-haomai-testing---basic-smithi/279412/teuthology.log
>
> This can be repeated locally and I want to know what's the difference
> this case introduced
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About thread_local and TmapMigratePP.DataScan case
  2016-06-27 18:04 About thread_local and TmapMigratePP.DataScan case Haomai Wang
  2016-06-28  9:45 ` John Spray
@ 2016-06-30  2:13 ` Yan, Zheng
  2016-06-30  2:16   ` Haomai Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Yan, Zheng @ 2016-06-30  2:13 UTC (permalink / raw)
  To: Haomai Wang; +Cc: ceph-devel

On Tue, Jun 28, 2016 at 2:04 AM, Haomai Wang <haomai@xsky.com> wrote:
> Hi all,
>
> anyone who knows what's the special thing with TmapMigratePP.DataScan
> case. When I introduce thread_local variable in
> PR(https://github.com/ceph/ceph/pull/9783/files#diff-254a8401d238ec25c714a5596f85b5ebL64),
> it always failed because the thread local variable is assigned to zero
> when execute this test!
>

thread_local is not portable. In your case, using thread_local
variable is not necessary, you can use pthread_self() directly.

As I know pthread_self() return 0 if the program isn't linked to libpthread.so


> For example, when tid == 512596224 local_center should be 5fed4e48,
> but after begin this test case, this thread_local variable is assigned
> to zero!:
> tid=-512596224 local_center=5fed4e48 this=5fed4e48
> [New Thread 0x7fffdef21700 (LWP 11835)]
> tid=-512596224 local_center=5fed4e48 this=5fed4e48
> [New Thread 0x7fffde720700 (LWP 11836)]
> [New Thread 0x7fffddf1f700 (LWP 11837)]
> [New Thread 0x7fffdd71e700 (LWP 11838)]
> [New Thread 0x7fffdcf1d700 (LWP 11839)]
> [New Thread 0x7fffdc71c700 (LWP 11840)]
> [New Thread 0x7fffdbf1b700 (LWP 11841)]
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-134366272 local_center=0 this=5fed4e48
> tid=-512596224 local_center=0 this=5fed4e48
>
>
> QA job:http://qa-proxy.ceph.com/teuthology/haomai-2016-06-27_03:55:04-rados-wip-haomai-testing---basic-smithi/279412/teuthology.log
>
> This can be repeated locally and I want to know what's the difference
> this case introduced
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About thread_local and TmapMigratePP.DataScan case
  2016-06-30  2:13 ` Yan, Zheng
@ 2016-06-30  2:16   ` Haomai Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Haomai Wang @ 2016-06-30  2:16 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: ceph-devel

On Thu, Jun 30, 2016 at 10:13 AM, Yan, Zheng <ukernel@gmail.com> wrote:
> On Tue, Jun 28, 2016 at 2:04 AM, Haomai Wang <haomai@xsky.com> wrote:
>> Hi all,
>>
>> anyone who knows what's the special thing with TmapMigratePP.DataScan
>> case. When I introduce thread_local variable in
>> PR(https://github.com/ceph/ceph/pull/9783/files#diff-254a8401d238ec25c714a5596f85b5ebL64),
>> it always failed because the thread local variable is assigned to zero
>> when execute this test!
>>
>
> thread_local is not portable. In your case, using thread_local
> variable is not necessary, you can use pthread_self() directly.
>
> As I know pthread_self() return 0 if the program isn't linked to libpthread.so
>

yes, I have changed to pthread_self

>
>> For example, when tid == 512596224 local_center should be 5fed4e48,
>> but after begin this test case, this thread_local variable is assigned
>> to zero!:
>> tid=-512596224 local_center=5fed4e48 this=5fed4e48
>> [New Thread 0x7fffdef21700 (LWP 11835)]
>> tid=-512596224 local_center=5fed4e48 this=5fed4e48
>> [New Thread 0x7fffde720700 (LWP 11836)]
>> [New Thread 0x7fffddf1f700 (LWP 11837)]
>> [New Thread 0x7fffdd71e700 (LWP 11838)]
>> [New Thread 0x7fffdcf1d700 (LWP 11839)]
>> [New Thread 0x7fffdc71c700 (LWP 11840)]
>> [New Thread 0x7fffdbf1b700 (LWP 11841)]
>> tid=-134366272 local_center=0 this=5fed4e48
>> tid=-134366272 local_center=0 this=5fed4e48
>> tid=-134366272 local_center=0 this=5fed4e48
>> tid=-512596224 local_center=0 this=5fed4e48
>>
>>
>> QA job:http://qa-proxy.ceph.com/teuthology/haomai-2016-06-27_03:55:04-rados-wip-haomai-testing---basic-smithi/279412/teuthology.log
>>
>> This can be repeated locally and I want to know what's the difference
>> this case introduced
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-30  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 18:04 About thread_local and TmapMigratePP.DataScan case Haomai Wang
2016-06-28  9:45 ` John Spray
2016-06-30  2:13 ` Yan, Zheng
2016-06-30  2:16   ` Haomai Wang

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.