You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "icexin (via GitHub)" <gi...@apache.org> on 2025/09/15 10:33:17 UTC
[PR] bthread: fix simd memory align issue (brpc)
icexin opened a new pull request, #3092:
URL: https://github.com/apache/brpc/pull/3092
### What problem does this PR solve?
Issue Number: #3091
Problem Summary: 使用不需要对齐的指令进行原子store和load
### What is changed and the side effects?
Changed:
Side effects:
- Performance effects:
未对齐的情况下,可能需要额外的cpu周期来加载数据
- Breaking backward compatibility:
---
### Check List:
- Please make sure your changes are compilable.
- When providing us with a new feature, it is best to add related tests.
- Please follow [Contributor Covenant Code of Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "icexin (via GitHub)" <gi...@apache.org>.
icexin commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291751037
没有看到 `_value` 已经用 `BAIDU_CACHELINE_ALIGNMENT` 修饰了。对参数里面的 value 使用 `BAIDU_CACHELINE_ALIGNMENT` 修饰后不core了,我重新提交一下代码
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291678412
Value加上BAIDU_CACHELINE_ALIGNMENT,按64字节对齐能解决问题吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "icexin (via GitHub)" <gi...@apache.org>.
icexin commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291784383
> ```c++
> BAIDU_CACHELINE_ALIGNMENT
> ```
可以的
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright merged PR #3092:
URL: https://github.com/apache/brpc/pull/3092
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291767888
> 没有看到 `_value` 已经用 `BAIDU_CACHELINE_ALIGNMENT` 修饰了。对参数里面的 value 使用 `BAIDU_CACHELINE_ALIGNMENT` 修饰后不core了,我重新提交一下代码
https://github.com/apache/brpc/blob/0e7c6448a4e0ecfe9926b247262fb841b87db5f8/src/bthread/task_group.h#L75
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291773243
```c++
struct BAIDU_CACHELINE_ALIGNMENT Value {
int64_t v1;
int64_t v2;
};
```
这样能解决问题吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] bthread: fix simd memory align issue (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #3092:
URL: https://github.com/apache/brpc/pull/3092#issuecomment-3291784245
Macos ci problems haven been fixed in https://github.com/apache/brpc/pull/3093. Please update and rebase master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org