Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp634251imm; Sat, 14 Jul 2018 08:40:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpePoJGsYrVZEBhO6URyaN2ByQnXU9aqNqItZWxwH0x1N+7vSJuzjo33MADYuUC013dDHZ9M X-Received: by 2002:a63:7e1a:: with SMTP id z26-v6mr9889013pgc.278.1531582806261; Sat, 14 Jul 2018 08:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531582806; cv=none; d=google.com; s=arc-20160816; b=hExj/nqADluIwya5d9/L6LdgfHAqxudHL7ONHFVGPYAAoeMqJExcVrIutsZG6Wa949 YHQiumlXJyo008U/o4xEuCjJXaVNJF0yFevKSU4vhl/9Zr5MAXY+gWJlOm2qhi5cvJds DTiSaZXhUQsPYA1arkSHXKdstBS/zCM2zwzczaS+8letM8CfWD4WY6booDJd+xj62WW3 Fo916B1GH+WP7opltNsdfNMkTi2KDsBNavHJ8ZSy2V13sismSCVp0t4eu71NwWZkIVbg tblsRFrmI5/+MQUCNrxOT00mK+Lof0UZKsBobCw1HGR9ve1pr64bO7AExC/7zP53V0Sk oRaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=iluyll3MCCBbrDy+jCMfsrBekBknlCkm0XifQvaH1mE=; b=cMODBRFKTt3Ruh0uL+Il6O02k/H/wZh0DnlzHhhJ/iwKHnnZzXcIjYtUeFXBt/zaYP Up0EyNVGkdSjdwTSpG7fkY+diBDtAdApCVD6tn/OwZ9aka0Q08YXK6FcKi5sE+w8yERi Pz2kBO15t3u5IBjTEIzO0LlyIn3e9yF8P78pvauidvSDQCF1vpI5LHjCEAc+BnWAQ5Ex eP1N6leLX24v63Celh4l/PgmUhlVtRJltawHQaGU7TYsN/nJ7Pm5PdtRv1qYCO4i9nhG Cspzoybr8wHHy/Rjq1CZ3YvWDyBqlcNXUdBZTISsaFqk3UTAjmRisiabyEHqKuGtJ0eB gpWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M6Sz+C2P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j135-v6si30519692pfd.207.2018.07.14.08.39.51; Sat, 14 Jul 2018 08:40:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M6Sz+C2P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbeGNP57 (ORCPT + 99 others); Sat, 14 Jul 2018 11:57:59 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34137 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727315AbeGNP57 (ORCPT ); Sat, 14 Jul 2018 11:57:59 -0400 Received: by mail-wr1-f68.google.com with SMTP id c13-v6so27747824wrt.1 for ; Sat, 14 Jul 2018 08:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iluyll3MCCBbrDy+jCMfsrBekBknlCkm0XifQvaH1mE=; b=M6Sz+C2P0N3PoJ0mQ2Gasps7WsdEUP/I8XExH8cIdMf+umBw99aG5DcAocXVXrFs8F bGleg9/NiJQ21OGl88F5BBYsb0zJ+nJ7U9sVyiFCk83FgclMilHDHzZVWD5utHBDutDR 9Q1U05yS6BwyOpTt07JQK31m19nIIYNPXwjhKwYeuSBKoCROzb3sfH6rEzhrJOUaieU1 /pD6q9/NFNzi5/nvTyvZ/Uw7G+mLPvgNfdt7YceCPN0D6oyB0ZpTwLw9u16gOO334y8R RwBVWm9tMQXA81RYF7bV5mWDRhWUJS1kI1EEU73vCN+nvV/6dS+IjgdX8+A8qrYQkGM3 fskw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iluyll3MCCBbrDy+jCMfsrBekBknlCkm0XifQvaH1mE=; b=NCwKY7Qz2C5D7r88NiVY+TLpES83GA6sBpWJNPXNTS8D8YimrPdU2Mynyz5MweUzef iLOr2KJZV/XGwxeGFqyHDWcigUBqX2IWhMzv07f7OgNfFUx0cnC5k9FB72veTblJqo4x QaztVvBiQXNX535XVSZLcnKhu/RTo9GTp/HlrIw1PeItuUfH3qcWNZu5dSKRw+wLZgEu X19DrsvoyCroQzUESjwsuWeUY5EOzab59er1LsgxaGUPZoC9Nn6JbsHH7RU7S1sF4VCF Uq46FQCMC+5XrfuEgemtlLkWXpnK5GjDa99/BxmkzS9XK9O7CCrVPJ/1gCg9fHqRney/ hrYQ== X-Gm-Message-State: AOUpUlHoKy0idWfdjptd4ut95y6509l2B62FsuD3ySXw2HK4Xfwl6bFi bKPuURUO5TusU4+ix2Edj7Rd89UFpoFCSFrWDmMgnw== X-Received: by 2002:a5d:4a07:: with SMTP id m7-v6mr8459698wrq.8.1531582711174; Sat, 14 Jul 2018 08:38:31 -0700 (PDT) MIME-Version: 1.0 References: <1531557122-12540-1-git-send-email-laoar.shao@gmail.com> In-Reply-To: <1531557122-12540-1-git-send-email-laoar.shao@gmail.com> From: Shakeel Butt Date: Sat, 14 Jul 2018 08:38:17 -0700 Message-ID: Subject: Re: [PATCH] mm: avoid bothering interrupted task when charge memcg in softirq To: Yafang Shao Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Cgroups , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 14, 2018 at 1:32 AM Yafang Shao wrote: > > try_charge maybe executed in packet receive path, which is in interrupt > context. > In this situation, the 'current' is the interrupted task, which may has > no relation to the rx softirq, So it is nonsense to use 'current'. > Have you actually seen this occurring? I am not very familiar with the network code but I can think of two ways try_charge() can be called from network code. Either through kmem charging or through mem_cgroup_charge_skmem() and both locations correctly handle interrupt context. Shakeel