Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbdHNHaV (ORCPT ); Mon, 14 Aug 2017 03:30:21 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:44527 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbdHNHaU (ORCPT ); Mon, 14 Aug 2017 03:30:20 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 14 Aug 2017 16:29:00 +0900 From: Byungchul Park To: Boqun Feng Cc: Byungchul Park , Peter Zijlstra , Ingo Molnar , tglx@linutronix.de, Michel Lespinasse , kirill@shutemov.name, "linux-kernel@vger.kernel.org" , linux-mm@kvack.org, akpm@linux-foundation.org, willy@infradead.org, npiggin@gmail.com, kernel-team@lge.com Subject: Re: [PATCH v8 06/14] lockdep: Detect and handle hist_lock ring buffer overwrite Message-ID: <20170814072900.GL20323@X58A-UD3R> References: <20170810115922.kegrfeg6xz7mgpj4@tardis> <016b01d311d1$d02acfa0$70806ee0$@lge.com> <20170810125133.2poixhni4d5aqkpy@tardis> <20170810131737.skdyy4qcxlikbyeh@tardis> <20170811034328.GH20323@X58A-UD3R> <20170811080329.3ehu7pp7lcm62ji6@tardis> <20170811085201.GI20323@X58A-UD3R> <20170811094448.GJ20323@X58A-UD3R> <20170814070522.wwj4as2hk2o7avlu@tardis> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170814070522.wwj4as2hk2o7avlu@tardis> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 520 Lines: 21 On Mon, Aug 14, 2017 at 03:05:22PM +0800, Boqun Feng wrote: > > 1. Boqun's approach > > My approach requires(additionally): > > MAX_XHLOCKS_NR * sizeof(unsigned int) // because of the hist_id field in hist_lock > > bytes per task. > > > 2. Peterz's approach > > And Peter's approach requires(additionally): > > 1 * sizeof(unsigned int) > > bytes per task. > > So basically we need some tradeoff between memory footprints and history > precision here. I see what you intended. Then, Peterz's one looks better.