From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 461 invoked by alias); 19 Nov 2013 06:19:54 -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 452 invoked by uid 89); 19 Nov 2013 06:19:54 -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 06:19:53 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Vieev-00024u-Ig from Yao_Qi@mentor.com ; Mon, 18 Nov 2013 22:19:37 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 18 Nov 2013 22:19:37 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 18 Nov 2013 22:19:34 -0800 Message-ID: <528B0298.6040404@codesourcery.com> Date: Tue, 19 Nov 2013 06:43: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: Doug Evans , gdb-patches Subject: Re: [PATCH 08/10] Don't invalidate dcache when option stack-cache is changed References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> <1383458049-20893-9-git-send-email-yao@codesourcery.com> <528A3591.2010005@redhat.com> In-Reply-To: <528A3591.2010005@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00512.txt.bz2 On 11/18/2013 11:43 PM, Pedro Alves wrote: > On 11/17/2013 09:44 PM, Doug Evans wrote: > >> I'm still not comfortable with this. >> This is optimizing a rare occurrence. Users aren't expected to be >> turning this on and off during a session. > > My thoughts exactly. This seems to be adding extra code, therefore > a wider surface for bugs, for no apparent real use case? > The motivation of this patch is not about performance improvement, but about using target_dcache for code caching, as I described in the mail below... > Nowadays, option "stack-cache" on->off and off->on transitions trigger > cache invalidation. It is not very necessary and not friendly to > using target_dcache for other purpose, such as code caching. ... here. We've decided to use a single global target_dcache for both stack caching and code caching. However, it is odd to me that option "stack-cache" transitions invalidate cache for code. If the behaviour like this is acceptable to you, I am OK to keep the existing behaviour unchanged, and add option "code-cache". Finally, either option "stack-cache" or option "code-cache" transitions will invalidate the global cache. What do you think? -- Yao (齐尧)