From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbcGQULo (ORCPT ); Sun, 17 Jul 2016 16:11:44 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36829 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbcGQULm (ORCPT ); Sun, 17 Jul 2016 16:11:42 -0400 Subject: Re: [RFC 02/18] cgroup_pids: track maximum pids To: Tejun Heo References: <1465847065-3577-1-git-send-email-toiwoton@gmail.com> <1465847065-3577-3-git-send-email-toiwoton@gmail.com> <20160613211227.GG31708@htj.duckdns.org> <17cb1a37-47b1-dbd4-6835-efad3cf6c12f@gmail.com> <20160613213354.GH31708@htj.duckdns.org> Cc: linux-kernel@vger.kernel.org, Li Zefan , Johannes Weiner , "open list:CONTROL GROUP (CGROUP)" From: Topi Miettinen Openpgp: id=A0F2EB0D8452DA908BEC8E911CF9ADDBD610E936 Message-ID: <3b03822f-c5d0-5b84-79c3-edeb8e78e2dd@gmail.com> Date: Sun, 17 Jul 2016 20:11:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160613213354.GH31708@htj.duckdns.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/13/16 21:33, Tejun Heo wrote: > Hello, > > On Mon, Jun 13, 2016 at 09:29:32PM +0000, Topi Miettinen wrote: >> I used fork callback as I don't want to lower the watermark in all cases >> where the charge can be lowered, so I'd update the watermark only when >> the fork really happens. > > I don't think that would make a noticeable difference. That's where > we decide whether to grant fork or not after all and thus where the > actual usage is. I tried using only charge functions, but then the result was too low. With fork callback, the result was as expected. -Topi > >> Is there a better way to compare and set? I don't think atomic_cmpxchg() >> does what's needed, > > cmpxchg loop should do what's necessary although I'm not sure how much > being strictly correct matters here. > > Thanks. >