From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761469AbdACVnk (ORCPT ); Tue, 3 Jan 2017 16:43:40 -0500 Received: from smtp2.provo.novell.com ([137.65.250.81]:33866 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdACVnb (ORCPT ); Tue, 3 Jan 2017 16:43:31 -0500 From: Davidlohr Bueso To: mingo@kernel.org, akpm@linux-foundation.org Cc: peterz@infradead.org, torvalds@linux-foundation.org, mark.rutland@arm.com, dave@stgolabs.net, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] current vs ptr to current dereferencing Date: Tue, 3 Jan 2017 13:43:10 -0800 Message-Id: <1483479794-14013-1-git-send-email-dave@stgolabs.net> X-Mailer: git-send-email 2.6.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is a re-spin of the earlier rfc[1] wrt deleting the set_task_state() interfaces. In order for us not taking a hit on arm64, these patches depend on Mark's fix to get rid of read_sysreg(): http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/476461.html First three patches get rid of 'tsk = current' based assignments to simply use current/get_current macro directly now that we have some actual numbers -- in which the conversion does improve some performance numbers, specially the locking bits. This is only around what directly is touched by patch 4, making it very obvious that we are indeed calling upon the current task. There are other users left with this pattern that could be cleaned up later. Applies against v4.10-rc2. [1] https://lkml.org/lkml/2016/12/30/230 Thanks. Davidlohr Bueso (4): kernel/exit: Compute current directly drivers/tty: Compute current directly kernel/locking: Compute current directly sched: Remove set_task_state() arch/um/drivers/random.c | 2 +- drivers/md/dm-bufio.c | 2 +- drivers/md/dm-crypt.c | 4 ++-- drivers/md/persistent-data/dm-block-manager.c | 4 ++-- .../staging/lustre/lnet/libcfs/linux/linux-debug.c | 2 +- drivers/tty/tty_ldsem.c | 18 +++++++-------- include/linux/sched.h | 27 +--------------------- kernel/exit.c | 22 +++++++++--------- kernel/locking/mutex.c | 19 ++++++++------- kernel/locking/rwsem-spinlock.c | 18 ++++++--------- kernel/locking/rwsem-xadd.c | 7 +++--- kernel/locking/semaphore.c | 7 +++--- 12 files changed, 49 insertions(+), 83 deletions(-) -- 2.6.6