From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753721AbdKII53 (ORCPT ); Thu, 9 Nov 2017 03:57:29 -0500 Received: from tretyak2.mcst.ru ([80.84.125.22]:35903 "EHLO tretyak2.mcst.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbdKII52 (ORCPT ); Thu, 9 Nov 2017 03:57:28 -0500 X-Greylist: delayed 866 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Nov 2017 03:57:28 EST To: linux-kernel@vger.kernel.org From: "Pavel V. Panteleev" Subject: pt_regs usage in cpuacct_charge() Cc: mingo@redhat.com, peterz@infradead.org Message-ID: <5A0414B6.1060100@mcst.ru> Date: Thu, 9 Nov 2017 11:41:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit X-Anti-Virus: Kaspersky Anti-Virus for Linux Mail Server 5.6.39/RELEASE, bases: 20111107 #2745587, check: 20171109 notchecked X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.1 (tretyak2.mcst.ru [192.168.20.110]); Thu, 09 Nov 2017 11:41:44 +0300 (GMT-3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! In cpuacct_charge() function pt_regs of other thread could be used. There is a such call chain: ...-> __schedule -> pick_next_task_fair -> load_balance -> idle_balance -> load_balance -> detach_tasks -> deactivate_task -> dequeue_task_fair -> dequeue_entity -> update_curr -> cpuacct_charge. I think that pt_regs could disappeared or be changed. How it's assumed to syncronize pt_regs usage in this place? Kernel verion 4.9.47-rt47. Best regards, Pavel V. Panteleev