Skip to contentSkip to conversation

OCFS2 cache coherent quesiton

Ocfs2-devel Gechangwei 2 participants 2 messages Apr 13, 2016 OCFS2

lore
Share & tools
lore

Gechangwei

author
#0 lore raw

Hi OCFS2 experts,

According to OCFS2 user guide, OCFS2 supports cache consistency, which means one node writes to shared disk while another node can get the newest data just written.

I am working hard on OCFS2 kernel code. I am confused that OCFS2 also adopts page cache provided by Linux Kernel, however, page cache does not know anything about other nodes in cluster.

Well, my question is that if data is cached by page cache in one node, how could another node read the newest data from it? At this scenario, the page cache is dirty and the disk data is old. How OCFS2 can support cache consistency?

Thanks,

Best regards.

Gechangwei
H3C Technologies Co., Limited

-------------------------------------------------------------------------------------------------------------------------------------
???????????????????????????????????????? ???????????????????????????????????????? ????????????????????????????????????????
???
This e-mail and its attachments contain confidential information from H3C, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20160413/f731e386/attachment.html

#1 lore raw

Hello Changwei,

You can take a look at dlm_lock related code, dlm_lock callback functions will handle how to make other nodes' certain inode page cache invalidate. Or, force the writing page cache to disk before read the data from other nodes.

Thanks
Gang

Quoted 42 lines
Quoted 1 line
Quoted 1 line

Hi OCFS2 experts,

According to OCFS2 user guide, OCFS2 supports cache consistency, which means one node writes to shared disk while another node can get the newest data just written.

I am working hard on OCFS2 kernel code. I am confused that OCFS2 also adopts page cache provided by Linux Kernel, however, page cache does not know anything about other nodes in cluster.

Well, my question is that if data is cached by page cache in one node, how could another node read the newest data from it? At this scenario, the page cache is dirty and the disk data is old. How OCFS2 can support cache consistency?

Thanks,

Best regards.

Gechangwei
H3C Technologies Co., Limited

----------------------------------------------------------------------------
---------------------------------------------------------
???????????????????????????????????????? ???????????????????????????????????????? ????????????????????????????????????????
???
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!