From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 444B3CA90AF for ; Wed, 13 May 2020 13:06:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0377A20673 for ; Wed, 13 May 2020 13:06:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="ia/CbeLy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0377A20673 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 887A490012E; Wed, 13 May 2020 09:06:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 838679000F3; Wed, 13 May 2020 09:06:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74E0790012E; Wed, 13 May 2020 09:06:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 5A9B59000F3 for ; Wed, 13 May 2020 09:06:09 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 17FD1249B for ; Wed, 13 May 2020 13:06:09 +0000 (UTC) X-FDA: 76811718858.21.soda97_1881cc23acb3f X-HE-Tag: soda97_1881cc23acb3f X-Filterd-Recvd-Size: 3747 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 May 2020 13:06:08 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id n14so17170465qke.8 for ; Wed, 13 May 2020 06:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=h765WvXxpy/Yg+afYA3tB6uLG1cyplu9hQ4hJS3lUyg=; b=ia/CbeLy2LUPItZTijdqb67Xr3yrC1V2Akofb2PmxGqinrWI+pOVsawEs0koo6v7Fa gCP6bgNNJEK8pRyTYOP+S2zHXdpnEQhx/xzNwQxKsaZBEZnkSIH7UdVoy2YQZri5EE1n 1j7UD2W0xvkZvdBu3sYJvokZzNFyGc9uIRNg4CtQLgsMria1ifdj8m/cmCJW4rt5tZ6p 4qDJhpVaz3noeluPwUkuQC4qisHe1BL6VfRkIdks8btyXCVbk4OrpI3Blz75jsmxju5N ko+IIc3A4yrdm5EUk5XlGvlfxdtzZWM+Rq7qzozf3HUdBfA4k3DbpgS3nHjRStqTAXeG piGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=h765WvXxpy/Yg+afYA3tB6uLG1cyplu9hQ4hJS3lUyg=; b=JOK8Ba97m2IwxbrE05GlKZ/tcDBl9mgAqoW3Uc27FBvYawqGNG5Med/WQiTSqq0xy7 JebnCbvslfYQ0zrydGcZjPkbW83GZ148Sj79F6iABmIcVQPdTE2vfLPGQHdIC9fTYL1o 2xl+AqvQyiP2Nmik6/gQng7aJK4H58QzIE3vKqpKZWFzzAZw+boDL10DePIT8bqgIDSE 2pBjQzqCHGAVbI5d2yEg44HsclDtN8G4H9fd12OsUuNvY4kx6DEPfkoJ9x2XlebuihaL ohb0d8/eMuiA6Ql2tBTDM/11irvY06H/qyP6crscLqoCEDif+Re002KaZrWCxrM7J5r5 pf1A== X-Gm-Message-State: AGi0PuZ9Z0GNb5R23LKgMegqAesHiDe+NpmX486tLVWcu1oRYyoazLNa TjKBLKI2Q0C/gl33v515PrWi5RXzz9s= X-Google-Smtp-Source: APiQypLareWSeJOjcn6Ughzj2NdzZwwaaqd1hP/cy6TF45FizW7Flugs+YQzTdDVvyLHzDwh/qUwsQ== X-Received: by 2002:a05:620a:1326:: with SMTP id p6mr27655338qkj.373.1589375167694; Wed, 13 May 2020 06:06:07 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:2627]) by smtp.gmail.com with ESMTPSA id g1sm13700151qkm.123.2020.05.13.06.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 06:06:06 -0700 (PDT) Date: Wed, 13 May 2020 09:05:48 -0400 From: Johannes Weiner To: Zefan Li Cc: Michal Hocko , Vladimir Davydov , Cgroups , linux-mm@kvack.org, Andrew Morton , Roman Gushchin , Shakeel Butt Subject: Re: [PATCH v2] memcg: Fix memcg_kmem_bypass() for remote memcg charging Message-ID: <20200513130548.GD488426@cmpxchg.org> References: <20200513090502.GV29153@dhcp22.suse.cz> <76f71776-d049-7407-8574-86b6e9d80704@huawei.com> <20200513112905.GX29153@dhcp22.suse.cz> <3a721f62-5a66-8bc5-247b-5c8b7c51c555@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a721f62-5a66-8bc5-247b-5c8b7c51c555@huawei.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 13, 2020 at 07:47:49PM +0800, Zefan Li wrote: > While trying to use remote memcg charging in an out-of-tree kernel module > I found it's not working, because the current thread is a workqueue thread. > > As we will probably encounter this issue in the future as the users of > memalloc_use_memcg() grow, it's better we fix it now. > > Signed-off-by: Zefan Li Acked-by: Johannes Weiner From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH v2] memcg: Fix memcg_kmem_bypass() for remote memcg charging Date: Wed, 13 May 2020 09:05:48 -0400 Message-ID: <20200513130548.GD488426@cmpxchg.org> References: <20200513090502.GV29153@dhcp22.suse.cz> <76f71776-d049-7407-8574-86b6e9d80704@huawei.com> <20200513112905.GX29153@dhcp22.suse.cz> <3a721f62-5a66-8bc5-247b-5c8b7c51c555@huawei.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=h765WvXxpy/Yg+afYA3tB6uLG1cyplu9hQ4hJS3lUyg=; b=ia/CbeLy2LUPItZTijdqb67Xr3yrC1V2Akofb2PmxGqinrWI+pOVsawEs0koo6v7Fa gCP6bgNNJEK8pRyTYOP+S2zHXdpnEQhx/xzNwQxKsaZBEZnkSIH7UdVoy2YQZri5EE1n 1j7UD2W0xvkZvdBu3sYJvokZzNFyGc9uIRNg4CtQLgsMria1ifdj8m/cmCJW4rt5tZ6p 4qDJhpVaz3noeluPwUkuQC4qisHe1BL6VfRkIdks8btyXCVbk4OrpI3Blz75jsmxju5N ko+IIc3A4yrdm5EUk5XlGvlfxdtzZWM+Rq7qzozf3HUdBfA4k3DbpgS3nHjRStqTAXeG piGw== Content-Disposition: inline In-Reply-To: <3a721f62-5a66-8bc5-247b-5c8b7c51c555-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Zefan Li Cc: Michal Hocko , Vladimir Davydov , Cgroups , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrew Morton , Roman Gushchin , Shakeel Butt On Wed, May 13, 2020 at 07:47:49PM +0800, Zefan Li wrote: > While trying to use remote memcg charging in an out-of-tree kernel module > I found it's not working, because the current thread is a workqueue thread. > > As we will probably encounter this issue in the future as the users of > memalloc_use_memcg() grow, it's better we fix it now. > > Signed-off-by: Zefan Li Acked-by: Johannes Weiner