From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752567AbdHNIu0 (ORCPT ); Mon, 14 Aug 2017 04:50:26 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:38684 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbdHNIuZ (ORCPT ); Mon, 14 Aug 2017 04:50:25 -0400 MIME-Version: 1.0 In-Reply-To: <1502089981-21272-10-git-send-email-byungchul.park@lge.com> References: <1502089981-21272-1-git-send-email-byungchul.park@lge.com> <1502089981-21272-10-git-send-email-byungchul.park@lge.com> From: Arnd Bergmann Date: Mon, 14 Aug 2017 10:50:24 +0200 X-Google-Sender-Auth: ZbhAErPEVdO9aoGZRz7iQx1RiCE Message-ID: Subject: Re: [PATCH v8 09/14] lockdep: Apply crossrelease to completions To: Byungchul Park Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , walken@google.com, Boqun Feng , kirill@shutemov.name, Linux Kernel Mailing List , Linux-MM , Andrew Morton , willy@infradead.org, Nicholas Piggin , kernel-team@lge.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 7, 2017 at 9:12 AM, Byungchul Park wrote: > Although wait_for_completion() and its family can cause deadlock, the > lock correctness validator could not be applied to them until now, > because things like complete() are usually called in a different context > from the waiting context, which violates lockdep's assumption. > > Thanks to CONFIG_LOCKDEP_CROSSRELEASE, we can now apply the lockdep > detector to those completion operations. Applied it. > > Signed-off-by: Byungchul Park This patch introduced a significant growth in kernel stack usage for a small set of functions. I see two new warnings for functions that get tipped over the 1024 or 2048 byte frame size limit in linux-next (with a few other patches applied): Before: drivers/md/dm-integrity.c: In function 'write_journal': drivers/md/dm-integrity.c:827:1: error: the frame size of 504 bytes is larger than xxx bytes [-Werror=frame-larger-than=] drivers/mmc/core/mmc_test.c: In function 'mmc_test_area_io_seq': drivers/mmc/core/mmc_test.c:1491:1: error: the frame size of 680 bytes is larger than 104 bytes [-Werror=frame-larger-than=] After: drivers/md/dm-integrity.c: In function 'write_journal': drivers/md/dm-integrity.c:827:1: error: the frame size of 1280 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/mmc/core/mmc_test.c: In function 'mmc_test_area_io_seq': drivers/mmc/core/mmc_test.c:1491:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] I have not checked in detail why this happens, but I'm guessing that there is an overall increase in stack usage with CONFIG_LOCKDEP_COMPLETE in functions using completions, and I think it would be good to try to come up with a version that doesn't add as much. Arnd