From owner-svn-src-stable-6@FreeBSD.ORG Tue May 18 02:30:46 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D7941065678; Tue, 18 May 2010 02:30:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31E888FC1C; Tue, 18 May 2010 02:30:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4I2UkDM012594; Tue, 18 May 2010 02:30:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2Uk0X012593; Tue, 18 May 2010 02:30:46 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180230.o4I2Uk0X012593@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208246 - in stable/6/usr.bin/calendar: . calendars X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:30:46 -0000 Author: dougb Date: Tue May 18 02:30:45 2010 New Revision: 208246 URL: http://svn.freebsd.org/changeset/base/208246 Log: Pull mergeinfo from r193462 up to the proper directory Modified: Directory Properties: stable/6/usr.bin/calendar/ (props changed) stable/6/usr.bin/calendar/calendars/ (props changed) From owner-svn-src-stable-6@FreeBSD.ORG Tue May 18 02:31:37 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B7C1065675; Tue, 18 May 2010 02:31:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEDF98FC1D; Tue, 18 May 2010 02:31:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4I2Vb4v012844; Tue, 18 May 2010 02:31:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4I2VbmS012842; Tue, 18 May 2010 02:31:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005180231.o4I2VbmS012842@svn.freebsd.org> From: Doug Barton Date: Tue, 18 May 2010 02:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208247 - stable/6/usr.bin/calendar/calendars X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:31:37 -0000 Author: dougb Date: Tue May 18 02:31:37 2010 New Revision: 208247 URL: http://svn.freebsd.org/changeset/base/208247 Log: MFC r208089: Remove duplicate Modified: stable/6/usr.bin/calendar/calendars/calendar.history Directory Properties: stable/6/usr.bin/calendar/ (props changed) Modified: stable/6/usr.bin/calendar/calendars/calendar.history ============================================================================== --- stable/6/usr.bin/calendar/calendars/calendar.history Tue May 18 02:30:45 2010 (r208246) +++ stable/6/usr.bin/calendar/calendars/calendar.history Tue May 18 02:31:37 2010 (r208247) @@ -80,7 +80,6 @@ 03/15 Watts, Los Angeles, riots kill two, injure 25, 1966 03/15 Ides of March. Gaius Julius Caesar assassinated by senators, including adoptive son Marcus Junius Brutus Caepio, 44BC -03/16 First liquid-fuel-powered rocket flight, 1926 03/16 MyLai Massacre; 300 non-combatant villagers killed by US infantrymen 03/16 Robert Goddard launches first liquid-fueled rocket, Auburn MA, 1926 03/17 Vanguard I launched, 1958. Earth proved pear-shaped From owner-svn-src-stable-6@FreeBSD.ORG Wed May 19 22:36:47 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69BA2106566B; Wed, 19 May 2010 22:36:47 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58E8B8FC19; Wed, 19 May 2010 22:36:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4JMal43008821; Wed, 19 May 2010 22:36:47 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4JMal3b008816; Wed, 19 May 2010 22:36:47 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201005192236.o4JMal3b008816@svn.freebsd.org> From: Attilio Rao Date: Wed, 19 May 2010 22:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208319 - in stable/6/sys: kern sys vm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 22:36:47 -0000 Author: attilio Date: Wed May 19 22:36:46 2010 New Revision: 208319 URL: http://svn.freebsd.org/changeset/base/208319 Log: MFC: r206264 When OOM searches for a process to kill, ignore the processes already killed by OOM. When killed process waits for a page allocation, try to satisfy the request as fast as possible. Sponsored by: Sandvine Incorporated Modified: stable/6/sys/kern/kern_sig.c stable/6/sys/sys/proc.h stable/6/sys/vm/vm_fault.c stable/6/sys/vm/vm_pageout.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/kern/kern_sig.c ============================================================================== --- stable/6/sys/kern/kern_sig.c Wed May 19 22:03:45 2010 (r208318) +++ stable/6/sys/kern/kern_sig.c Wed May 19 22:36:46 2010 (r208319) @@ -2408,6 +2408,7 @@ killproc(p, why) p, p->p_pid, p->p_comm); log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); + p->p_flag |= P_WKILLED; psignal(p, SIGKILL); } Modified: stable/6/sys/sys/proc.h ============================================================================== --- stable/6/sys/sys/proc.h Wed May 19 22:03:45 2010 (r208318) +++ stable/6/sys/sys/proc.h Wed May 19 22:36:46 2010 (r208319) @@ -654,11 +654,13 @@ struct proc { #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ +#define P_WKILLED 0x2000000 /* Killed, go to kernel/user boundary ASAP. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_STOPPED (P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE) #define P_SHOULDSTOP(p) ((p)->p_flag & P_STOPPED) +#define P_KILLED(p) ((p)->p_flag & P_WKILLED) /* These flags are kept in p_sflag and are protected with sched_lock. */ #define PS_INMEM 0x00001 /* Loaded into memory. */ Modified: stable/6/sys/vm/vm_fault.c ============================================================================== --- stable/6/sys/vm/vm_fault.c Wed May 19 22:03:45 2010 (r208318) +++ stable/6/sys/vm/vm_fault.c Wed May 19 22:36:46 2010 (r208319) @@ -218,7 +218,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr vm_object_t next_object; vm_page_t marray[VM_FAULT_READ]; int hardfault; - int faultcount; + int faultcount, alloc_req; struct faultstate fs; hardfault = 0; @@ -449,11 +449,21 @@ RetryFault:; /* * Allocate a new page for this object/offset pair. + * + * Unlocked read of the p_flag is harmless. At + * worst, the P_KILLED might be not observed + * there, and allocation can fail, causing + * restart and new reading of the p_flag. */ fs.m = NULL; - if (!vm_page_count_severe()) { + if (!vm_page_count_severe() || P_KILLED(curproc)) { + alloc_req = P_KILLED(curproc) ? + VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL; + if (fs.vp == NULL && + fs.object->backing_object == NULL) + alloc_req |= VM_ALLOC_ZERO; fs.m = vm_page_alloc(fs.object, fs.pindex, - (fs.vp || fs.object->backing_object)? VM_ALLOC_NORMAL: VM_ALLOC_ZERO); + alloc_req); } if (fs.m == NULL) { unlock_and_deallocate(&fs); @@ -478,7 +488,8 @@ readrest: int ahead, behind; u_char behavior = vm_map_entry_behavior(fs.entry); - if (behavior == MAP_ENTRY_BEHAV_RANDOM) { + if (behavior == MAP_ENTRY_BEHAV_RANDOM || + P_KILLED(curproc)) { ahead = 0; behind = 0; } else { Modified: stable/6/sys/vm/vm_pageout.c ============================================================================== --- stable/6/sys/vm/vm_pageout.c Wed May 19 22:03:45 2010 (r208318) +++ stable/6/sys/vm/vm_pageout.c Wed May 19 22:36:46 2010 (r208319) @@ -1276,10 +1276,10 @@ vm_pageout_oom(int shortage) if (PROC_TRYLOCK(p) == 0) continue; /* - * If this is a system or protected process, skip it. + * If this is a system, protected or killed process, skip it. */ if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || - (p->p_pid == 1) || + (p->p_pid == 1) || P_KILLED(p) || ((p->p_pid < 48) && (swap_pager_avail != 0))) { PROC_UNLOCK(p); continue; From owner-svn-src-stable-6@FreeBSD.ORG Thu May 20 05:57:34 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A63B106567B for ; Thu, 20 May 2010 05:57:34 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.211.175]) by mx1.freebsd.org (Postfix) with ESMTP id E8B088FC26 for ; Thu, 20 May 2010 05:57:33 +0000 (UTC) Received: by ywh5 with SMTP id 5so4983527ywh.13 for ; Wed, 19 May 2010 22:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rfvO/8MOuh1rsL9Zm8HR5qrvHVugo8FTTyE565p2sDA=; b=pPydAQFDXLTYl3PdlrnaxdlzsYjI/sNvBC53SdTUy1SQjNQW7Xexb0OQU3hs56q2sp o3m93qX1s7pXpVgTpQz0PC9oR82ySG0uTDKqeEsdKrAHYeLf2M1lNrsUsJ0qr2o09KYa nZb1Qe5Xua+zoA1TaixTqtcE3mLa6DKMbu1Bo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=TyqJ5UyLN9cSQ+2aHDAuQzop6QiLanScof2mmgdmkqpQ2gDot2pBa15iEoVdNj57MS tyG+c934yRUgRNp+KpJJWZQXM+L8mP0yIV4VJBMDpziJ1/XwEKRjxoWf3ja8DhNxH68U GPLhgT8EnTpwle/xCTCDSOPo1oaVH1LcjKBV4= MIME-Version: 1.0 Received: by 10.100.246.23 with SMTP id t23mr10913106anh.167.1274333362017; Wed, 19 May 2010 22:29:22 -0700 (PDT) Received: by 10.100.208.9 with HTTP; Wed, 19 May 2010 22:29:21 -0700 (PDT) In-Reply-To: <201005192236.o4JMal3b008816@svn.freebsd.org> References: <201005192236.o4JMal3b008816@svn.freebsd.org> Date: Thu, 20 May 2010 09:29:21 +0400 Message-ID: From: pluknet To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r208319 - in stable/6/sys: kern sys vm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 05:57:34 -0000 On 20 May 2010 02:36, Attilio Rao wrote: > Author: attilio > Date: Wed May 19 22:36:46 2010 > New Revision: 208319 > URL: http://svn.freebsd.org/changeset/base/208319 > > Log: > =A0MFC: r206264 > =A0When OOM searches for a process to kill, ignore the processes already > =A0killed by OOM. When killed process waits for a page allocation, try to > =A0satisfy the request as fast as possible. > > =A0Sponsored by: Sandvine Incorporated > Great, thank you! --=20 wbr, pluknet