From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbcGNCwh (ORCPT ); Wed, 13 Jul 2016 22:52:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:19961 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbcGNCw1 (ORCPT ); Wed, 13 Jul 2016 22:52:27 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,360,1464678000"; d="scan'208";a="994828363" From: Lv Zheng To: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH 0/3] ACPI / debugger: Add kernel flushing support Date: Thu, 14 Jul 2016 10:52:01 +0800 Message-Id: X-Mailer: git-send-email 1.7.10 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org AML debugger is implemented in the kernel as a character device located in the debugfs. Currently, when its batch mode is used, the userspace tool needs to flush the logs/prompts remained in the kernel output buffer, this is implemented in an inefficient way in the userspace by polling the IO and reading everything out. This patch introduces a kernel space flushing support, so that userspace can invoke fsync() to put the driver into a state waiting for new commands, all kernel space logs/prompts will be automatically discarded by fsync(). Lv Zheng (3): debugfs: Add .fsync() callback proxy support ACPI / debugger: Add kernel flushing support tools/power/acpi/acpidbg: Use new flushing mechanism drivers/acpi/acpi_dbg.c | 94 ++++++++++++++++++++++++++++-- fs/debugfs/file.c | 6 ++ tools/power/acpi/tools/acpidbg/acpidbg.c | 49 ++-------------- 3 files changed, 101 insertions(+), 48 deletions(-) -- 1.7.10