You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yunkai Zhang (JIRA)" <ji...@apache.org> on 2013/11/15 09:37:33 UTC
[jira] [Commented] (TS-2352) new_IOBufferData_internal() can't be
used outside of event threads.
[ https://issues.apache.org/jira/browse/TS-2352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823475#comment-13823475 ]
Yunkai Zhang commented on TS-2352:
----------------------------------
I thought of two solution about this issue:
1) the simplest one:
Hi [~bcall], how about revert the new_IOBufferBlock_internal() function to the original version? (but keeps other changes in this commit).
2) more complex one:
Move the definition of "ProxyAllocator xxxx" in *EThread* class to its parent *Thread* class, so that all threads can feel free to use THREAD_ALLOC feature.
And I want to remind again - after enable reclaimable-freelist feature, all THREAD_ALLOC are cumbersome, as the reclaimable-freelist have implemented thread-local pool.
So if use 2) solution, I'll disable THREAD_ALLOC when enable reclaimable-freelist.
> new_IOBufferData_internal() can't be used outside of event threads.
> -------------------------------------------------------------------
>
> Key: TS-2352
> URL: https://issues.apache.org/jira/browse/TS-2352
> Project: Traffic Server
> Issue Type: Improvement
> Components: Core
> Reporter: Yunkai Zhang
>
> My coworkers([~weijin] and [~happy_fish100]) are merging the code of cluster refine to master branch.
> But they found that new_IOBufferData_internal() in the new cluster threads are crashing after merged into master branch.
> The reason is that new_IOBufferData_internal() was changed by this commit:
> {code}
> commit 052da6724140c1a4721c5cf3f9b64810ab4444b8
> Author: Bryan Call <bc...@apache.org>
> Date: Mon Jun 17 14:13:07 2013 -0700
> TS-1684 - Added more ProxyAllocators for faster and local memory
> allocation. Have seen a doubling in performance depending on the benchmark.
> Details in the ticket.
> ...
> @@ -352,7 +352,7 @@ new_IOBufferBlock_internal(
> #endif
> )
> {
> - IOBufferBlock *b = ioBlockAllocator.alloc();
> + IOBufferBlock *b = THREAD_ALLOC(ioBlockAllocator, this_ethread());
> ...
> }
> {code}
> After this commit, new_IOBufferData_internal() depends on *event threads* and can't be used by other normal threads.
> I'm going to refine this function.
--
This message was sent by Atlassian JIRA
(v6.1#6144)