From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28784 invoked by alias); 19 Nov 2013 12:49:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28775 invoked by uid 89); 19 Nov 2013 12:49:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_50,GARBLED_BODY,RDNS_NONE autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2013 12:49:36 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Vikk3-0002aZ-Iu from Yao_Qi@mentor.com ; Tue, 19 Nov 2013 04:49:19 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 19 Nov 2013 04:49:19 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Tue, 19 Nov 2013 04:49:18 -0800 Message-ID: <528B5DF0.9080501@codesourcery.com> Date: Tue, 19 Nov 2013 13:12:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 05/10] Invalidate or shrink dcache when setting is changed. References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> <1383458049-20893-6-git-send-email-yao@codesourcery.com> <528A38B5.6020906@redhat.com> <528AFE6E.9000009@codesourcery.com> <528B4DCA.8090404@redhat.com> In-Reply-To: <528B4DCA.8090404@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00532.txt.bz2 On 11/19/2013 07:38 PM, Pedro Alves wrote: > Sure, OK, I guess I did the wrong question then. I really mean, > why should we care about preserving the cache when the user > changes cache size? What makes this a use case users actually > care about? I don't think users going to be doing this To question #1, because it is expensive to fetch contents from target memory, and it is unnecessary to flush cache when user changes cache size. To question #2, nothing. Cache invalidation is invisible to user. > sort of thing in a loop? At most a couple times to check which > size might be better for then, and then stick it in .gdbinit, > forever after forgotten. > > Actually, if I was probing for the ideal size, I think I'd be > annoyed that GDB didn't flush the cache, as I'd try > disassembling/backtracing with different cache sizes, and > always want to start from a cold cache. I agree that use case #3 is not very useful. > >> >This "extra complication" looks natural or reasonable to a software >> >cache. > It's always a complication/necessity/usefulness balance. > It doesn't look so reasonable if the complication it adds > isn't useful in practice, because more code usually means more > chances of getting things wrong. The question is then what is > the real use case that makes this necessary, as opposed to keeping > it simple. > If use case #1 and #2 are not real use cases, I don't have a real use case to show the cache invalidation is avoided due this patch. -- Yao (齐尧)