* How to invalidate all cache
@ 2014-10-13 3:03 Zheng Liu
2014-10-13 3:16 ` Slava Pestov
0 siblings, 1 reply; 6+ messages in thread
From: Zheng Liu @ 2014-10-13 3:03 UTC (permalink / raw)
To: linux-bcache; +Cc: Zheng Liu
Hi all,
I am trying to do some benchmarks against bcache, espeically in cache
miss scenario, but I don't find a user interface to invalidate all
cache. Anyone can tell me how to do that.
Thanks in advance,
- Zheng
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to invalidate all cache
2014-10-13 3:03 How to invalidate all cache Zheng Liu
@ 2014-10-13 3:16 ` Slava Pestov
2014-10-13 3:45 ` Zheng Liu
0 siblings, 1 reply; 6+ messages in thread
From: Slava Pestov @ 2014-10-13 3:16 UTC (permalink / raw)
To: Zheng Liu; +Cc: linux-bcache, Zheng Liu
You can try to detach the backing device, which will cause all dirty
data to be written back, and attach it again.
On Sun, Oct 12, 2014 at 8:03 PM, Zheng Liu <gnehzuil.liu@gmail.com> wrote:
> Hi all,
>
> I am trying to do some benchmarks against bcache, espeically in cache
> miss scenario, but I don't find a user interface to invalidate all
> cache. Anyone can tell me how to do that.
>
> Thanks in advance,
> - Zheng
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" 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] 6+ messages in thread
* Re[2]: How to invalidate all cache
2014-10-13 3:45 ` Zheng Liu
@ 2014-10-13 3:43 ` Pavel Goran
2014-10-13 13:30 ` Zheng Liu
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Goran @ 2014-10-13 3:43 UTC (permalink / raw)
To: linux-bcache
Hello Zheng,
Monday, October 13, 2014, 10:45:37 AM, you wrote:
> Yes, detaching a backing device will make all dirty data to be written
> back to the backing device. But if I understand correctly it couldn't
> invalidate all data in cache device. That means that after attaching
> backing device the data in cache device is still valid.
It would be a bug if cached data were considered valid after detaching and
re-attaching. Because while a cache device an a backing device were separated,
data could be written to a backing device, this would possibly make data in a
"disconnected" cache obsolete.
Pavel Goran
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to invalidate all cache
2014-10-13 3:16 ` Slava Pestov
@ 2014-10-13 3:45 ` Zheng Liu
2014-10-13 3:43 ` Re[2]: " Pavel Goran
0 siblings, 1 reply; 6+ messages in thread
From: Zheng Liu @ 2014-10-13 3:45 UTC (permalink / raw)
To: Slava Pestov; +Cc: linux-bcache, Zheng Liu
Hi Slava,
Thanks for your reply.
On Sun, Oct 12, 2014 at 08:16:31PM -0700, Slava Pestov wrote:
> You can try to detach the backing device, which will cause all dirty
> data to be written back, and attach it again.
Yes, detaching a backing device will make all dirty data to be written
back to the backing device. But if I understand correctly it couldn't
invalidate all data in cache device. That means that after attaching
backing device the data in cache device is still valid. All I want to
do is to remove all data in cache device. Any idea?
Regards,
- Zheng
>
> On Sun, Oct 12, 2014 at 8:03 PM, Zheng Liu <gnehzuil.liu@gmail.com> wrote:
> > Hi all,
> >
> > I am trying to do some benchmarks against bcache, espeically in cache
> > miss scenario, but I don't find a user interface to invalidate all
> > cache. Anyone can tell me how to do that.
> >
> > Thanks in advance,
> > - Zheng
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" 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] 6+ messages in thread
* Re: How to invalidate all cache
2014-10-13 3:43 ` Re[2]: " Pavel Goran
@ 2014-10-13 13:30 ` Zheng Liu
2014-10-13 18:13 ` (unknown) Eric Wheeler
0 siblings, 1 reply; 6+ messages in thread
From: Zheng Liu @ 2014-10-13 13:30 UTC (permalink / raw)
To: Pavel Goran; +Cc: linux-bcache
On Mon, Oct 13, 2014 at 10:43:14AM +0700, Pavel Goran wrote:
> Hello Zheng,
>
> Monday, October 13, 2014, 10:45:37 AM, you wrote:
>
> > Yes, detaching a backing device will make all dirty data to be written
> > back to the backing device. But if I understand correctly it couldn't
> > invalidate all data in cache device. That means that after attaching
> > backing device the data in cache device is still valid.
>
> It would be a bug if cached data were considered valid after detaching and
> re-attaching. Because while a cache device an a backing device were separated,
> data could be written to a backing device, this would possibly make data in a
> "disconnected" cache obsolete.
Ah, Thanks for pointing it out. I got it.
BTW, there is a bug when I tried to detach/attach a backing device.
A patch has sent out to the mailing list. That would be great if some
one can review it.
Regards,
- Zheng
^ permalink raw reply [flat|nested] 6+ messages in thread
* (unknown)
2014-10-13 13:30 ` Zheng Liu
@ 2014-10-13 18:13 ` Eric Wheeler
0 siblings, 0 replies; 6+ messages in thread
From: Eric Wheeler @ 2014-10-13 18:13 UTC (permalink / raw)
To: linux-bcache
unsubscribe linux-bcache
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-13 18:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 3:03 How to invalidate all cache Zheng Liu
2014-10-13 3:16 ` Slava Pestov
2014-10-13 3:45 ` Zheng Liu
2014-10-13 3:43 ` Re[2]: " Pavel Goran
2014-10-13 13:30 ` Zheng Liu
2014-10-13 18:13 ` (unknown) Eric Wheeler
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.